Search Box that Queries multiple column's of a table

J

Jeremy

I need to create a search page that queries multiple columns in a database table.
I'm new to SQL and FP2003 and am not sure about the creating the custom search strings. Here's what I am working with.

Table: General_Work
Columns: WorkID, EmployeeName, JobClass

I'd like to make it so that a user could input whatever text they would like into the textbox on the search page. That in turn would query the entire table General_Work and return whatever had that keyword in it. Is this possible? Does anyone have any suggestions? Let me know. Thanks!
 
K

Kevin Spencer

SELECT WorkID, EmployeeName, JobClass
WHERE (WorkID LIKE '%Some String%')
OR (EmployeeName LIKE '%Some String%')
OR (JobClass LIKE '%Some String%')

The "%" characters are wildcard characters, which means any value CONTAINING
the value input will match.

I can't help you with the DRW, but that's the correct SQL syntax for your
query.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Jeremy said:
I need to create a search page that queries multiple columns in a database table.
I'm new to SQL and FP2003 and am not sure about the creating the custom
search strings. Here's what I am working with.
Table: General_Work
Columns: WorkID, EmployeeName, JobClass

I'd like to make it so that a user could input whatever text they would
like into the textbox on the search page. That in turn would query the
entire table General_Work and return whatever had that keyword in it. Is
this possible? Does anyone have any suggestions? Let me know. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top