|
Archives of the TeradataForumMessage Posted: Mon, 10 Jan 2005 @ 09:55:46 GMT
The issue was as you said the incorrect use of the "ANY" operator eg to select records which have the string "LOCAL" or "CENTRAL" in the specified text column I use this syntax (which works fine): LIKE ANY ('%LOCAL'%,'%CENTRAL%') I needed to reverse this this (eg exclude records which have the string "LOCAL" or "CENTRAL"), so I added a NOT operator: NOT LIKE ANY ('%LOCAL'%,'%CENTRAL%') As you pointed out, this doesn't work, as it translates as "Exclude records that have the string "LOCAL" *and* "CENTRAL". To fix this I took your suggestion and changed the ANY to an ALL: NOT LIKE ALL ('%LOCAL'%,'%CENTRAL%') ...this generated the required effect of excluding records that had the string "LOCAL" *or* "CENTRAL". Seems so obvious now. Thanks for the help, Fred
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||