Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Left Join query

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2008-10-01 : 15:27:10
I need a query to check whether the records already exists in table using left join before inserting the record.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-01 : 15:31:08
Are you looking for this one:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111703
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2008-10-01 : 15:52:02
Thanks for your response i am looking different.
I need a query which should check the same table whether the record already exists.I don't want to update if the record already exists..
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-01 : 16:24:44
Have you looked at 'IF Exists' in BOL?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-10-01 : 16:42:38
sqlfresher2k7, provide a data example of what you mean to make it more clear to us.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-02 : 04:08:01
quote:
Originally posted by sqlfresher2k7

Thanks for your response i am looking different.
I need a query which should check the same table whether the record already exists.I don't want to update if the record already exists..


seems like what you need is just a IF NOT EXISTS() condition check before insert/update operation to insert/update only values that are not already present.
Go to Top of Page
   

- Advertisement -