Hi,
I have come across an SQL statement today that I actually thought was impossible. I always thought that a LIKE statement must use a literal value such as field1 like '%ABC'. But today I came across a subselect that used a like statement
select * from TABLE_A
where exists (select 'X' from TABLE_B where TABLE_B.f1 like '%'+TABLE_A.f2+'%')
As I said I didn't think you could use a field in a like statement. This works in SQL Server,,, could people tell me if this would function for other databases.
Thanks
Dave