Help with searching for a substring

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

Hope someone can help me

I am having a problem writing an sql query to limit the number of entries returned by searching for a substring. I know one can use LIKE '% %' to find a certain string in a field. The problem is that the string I need to search for is from another column in the table. For example I get the number in the GATE column than I need to check weather that number as a substring appears in the curGate table. If it does return the line if not don't.
 
Hello

Hope someone can help me.

I am having a problem writing an sql query to limit the number of entries returned by searching for a substring. I know one can use LIKE '% %' to find a certain string in a field. The problem is that the string I need to search for is from another column in the table. For example I get the number in the GATE column than I need to check weather that number as a substring appears in the curGate table. If it does return the line if not don't.

In SQL/Server or MSDE, you can use

LIKE "%" & [Gate] & "%"

In Access JET databases, the wildcard character is * rather than %.
 
Please restate with a few more exact example. You're close, though.

p.s. weather is rain, snow, etc. Use whether for readability.

Jonathan said:
Hello

Hope someone can help me.

I am having a problem writing an sql query to limit the number of entries
returned by searching for a substring. I know one can use LIKE '% %' to find
a certain string in a field. The problem is that the string I need to search
for is from another column in the table. For example I get the number in the
GATE column than I need to check weather that number as a substring appears
in the curGate table. If it does return the line if not don't.
 
Back
Top