Board index » Web Programming » Search Box that Queries multiple column's of a table

Search Box that Queries multiple column's of a table

Web Programming284
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!


-
 

Re:Search Box that Queries multiple column's of a table

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" <Jeremy@discussions.microsoft.com>wrote in message

Quote
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!





-