Microsoft
Software
Hardware
Network
Question : SQL select problem, if and only if using SQL 2005
I need to select contacts that have a subset of specific source codes (i.e. 'DFG20065', 'DS2456jsldf') but do not have any other records with different codes such as 'DTGHS35'.
For example,
select contactid, source from credhistory where
source in ('DFG20065', 'DS2456JSLDF')
is my initial select. However, I need to select contacts with these two and only these two source codes.
Can anyone help?
Thanks!
Answer : SQL select problem, if and only if using SQL 2005
select contactid, source from credhistory where
source in ('DFG20065', 'DS2456JSLDF')
and not exists (select 1 from credhistory where source not in ('DFG20065', 'DS2456JSLDF') )
Random Solutions
Crop Images
Your message did not reach some or all of the intended recipients.
How do i backup/restore a sharepoint services web on a different machine?
File sharing performance reduced after SP2 installation
WSS 3.0 migrate site from development machine to production server - Best practices
Too many indexes
PowerPoint 2007 Edit Links to Files buttons are greyed-out
set isql output file format
Automatic resizing of forms and text boxes
Variable 'dataRS' is used before it has been assigned a value. A null reference exception could result at runtime.