Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Contains/In Operator

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm used to the contains operator, but I think the IN operator will do what I want, only it isn't working.

Here's my sql command:
SELECT ACplatform from issues_temp WHERE ACPlatform in ('F/A-18 A/B/C/D')

I get no records returned, but I know that the value is in the list, also, I will get any records that are in there alone, but not if they're in a list in the field.

Any ideas?

Thanks
Bonnie
 
isn't the separator for the list a comma?

SELECT ACplatform from issues_temp WHERE ACPlatform in ('F','A-18','A','B','C','D')

or am I missing something, does your field conatin th e/ character - if so it will need to be delimited I would imaagine, \/ I think, been a while. ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Here's the actual data in my field: AV-8B,F/A-18 A/B/C/D,P-3C,AH-1W,CH-53DE,SH-60F
 
Here's the actual data in my field: AV-8B,F/A-18 A/B/C/D,P-3C,AH-1W,CH-53DE,SH-60F

Thanks!
 
IN will only return exact case sensitive and completely matched strings.

if you searc for AV-8B,F/A-18 A/B/C/D,P-3C,AH-1W,CH-53DE,SH-60F IN(''F/A-18 A/B/C/D')

then it will return 0.

If you searched for 'F/A-18 A/B/C/D' in ('F/A-18 A/B/C/D')
you would have a result.

you could use like or you need to move to FULLTEXT fields for rateable searching. (each answer is given a %age according to the squality of the match.

SELECT ACplatform from issues_temp WHERE ACPlatform LIKE '%F/A-18 A/B/C/D%';
would give you results, only you know how good the answers would be.


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top