cynthiakelly
04-27-2011, 08:19 PM
:( I need to compare two fields
victimOF (varchar(20), not null) AND chrgSeq (int, not null)
I didn't create the database; I'm trying to pull report(s). So, I have to work with the fields as they are. Here's a table of values the fields contain.
victimOF chrgSeq
-------- --------
1,2,4 2 chrgSeq(2) is contained in victimOF(1,2,4)
2,3,4 3 chrgSeq(3) is contained in victimOF(2,3,4)
2,3 1 chrgSeq(1) is NOT contained in victimOF(2,3)
I think I need my WHERE clause to contain
WHERE ... victimOF LIKE '%{chrgSeq}%'
I've been wrestling CONVERT/CAST for hours to convert the int field to some text-string value I can work with. I've been trying to concatenate percent-sign, chrgSeq-convertedToSTR, percent-sign. PLEASE HELP !
victimOF (varchar(20), not null) AND chrgSeq (int, not null)
I didn't create the database; I'm trying to pull report(s). So, I have to work with the fields as they are. Here's a table of values the fields contain.
victimOF chrgSeq
-------- --------
1,2,4 2 chrgSeq(2) is contained in victimOF(1,2,4)
2,3,4 3 chrgSeq(3) is contained in victimOF(2,3,4)
2,3 1 chrgSeq(1) is NOT contained in victimOF(2,3)
I think I need my WHERE clause to contain
WHERE ... victimOF LIKE '%{chrgSeq}%'
I've been wrestling CONVERT/CAST for hours to convert the int field to some text-string value I can work with. I've been trying to concatenate percent-sign, chrgSeq-convertedToSTR, percent-sign. PLEASE HELP !