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
 Quicker way of selecting contacts

Author  Topic 

Topaz
Posting Yak Master

199 Posts

Posted - 2008-05-29 : 05:00:28
Instead of selecting records like this:

Select website from wce_contact where uniqueid like

'O,U4Ba-l2Nmc' or uniqueid like
'O90kja8,aofc' or uniqueid like
'OIiZnaAHj1fc' or uniqueid like
'oho9mc2HA4fc' or uniqueid like
'ogJrMa.YV9mc' or uniqueid like
'PNocYaQtA6fc' or uniqueid like
'NLWTfcUSbXec' or uniqueid like
'O_eHjaNhPtfc' or uniqueid like
'OK(Qkau,H(fc' or uniqueid like
'nYcUfcCQbXec' or uniqueid like
'O-R5oa2C-2fc' or uniqueid like
'O-R5oa2C-2fc' or uniqueid like
'nPYhfat5eJec'

Is there anyway i can select these contacts without having to copy and paste 'or uniqueid like' numerous times?

Thanks!

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-05-29 : 05:09:17
As you are searching for literals, use uniqueid in ('O,U4Ba-l2Nmc','PNocYaQtA6fc'...)
Go to Top of Page

Topaz
Posting Yak Master

199 Posts

Posted - 2008-05-29 : 05:33:41
thanks you!!
Go to Top of Page
   

- Advertisement -