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
 General SQL Server Forums
 New to SQL Server Programming
 How can i compare two tables data

Author  Topic 

raghu2314
Starting Member

1 Post

Posted - 2011-10-12 : 10:17:22
Hi im new to sqlserver

im stuck with fallowing problem

i have two tables one is Entry and other is Threshold

i dnt have any relation ship between these two tables
but both tables have common id field
assume that thresold table has some values

if i enter some value in entry table i want to check whether this values crosses the threshold value or not



Raghuveer

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-10-12 : 10:37:50
>>
i dnt have any relation ship between these two tables
but both tables have common id field
>>
That doesn't make sense. Are they connected via the id or not.

If there's no relationship between the tables then you can't do anything with them.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-10-12 : 10:43:39
not quite sure what are you after,

maybe . . .

select *
from entry e
where not exists (select * from threshold t where t.value = e.value)



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -