Subject Re: [ib-support] Using LIKE with a subquery
Author Stevio
Has anyone got any ideas for this? Is it possible to have SQL that basically
says LIKE WHAT IS IN this subquery.

e.g. if the subquery returns "foot", I then want SQL to say LIKE '%foot%'.

The problem is the "foot" would be returned from a subquery.

If it is not possible please let me know.


----- Original Message -----
From: "Stevio" <redeagle@...>
To: "IB Support" <>
Sent: Tuesday, June 25, 2002 5:38 PM
Subject: [ib-support] Using LIKE with a subquery

> I have a query with a subquery. I would like the query to be able to use
> results from the subquery as part of what I am looking for.
> e.g. at the moment in the query's WHERE clause I have:
> (select THE_FIELD
> from TABLE
> where 'a condition is satisfied')
> However, if one of the subquery results for the field in question was
> 'TEST', and in the main query I want to use this word and search for
> 'TEST%', is this possible.
> Instead of the word IN what I need is SQL that lets me say LIKE WHAT IS IN
> this subquery.
> Is this possible? Is there another way?
> Thanks.
> Stephen