Click here to Skip to main content
15,887,411 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hello all
i want search by a word in all tabel filde?
i use from access and c# language...
Posted
Comments
Sinisa Hajnal 21-Jan-15 2:22am    
In all fields of a single table or in all tables? If its a single table, all columns, just create WHERE clause like in the solution.

1 solution

This assumes it is searching through all fields of a single table.

SELECT * FROM
table
WHERE
column1 LIKE @keyword
OR
column2 LIKE @keyword
OR
...all columns listed

You'll have to add generic wild card at the end of the keyword if you want to search only from the start of the value or at the start and end ( * + keyword + * ) if you want to search anywhere in the value.

NOTE: I'm writing from memory, wildcard could be some other character for access (like it is % in SQL Server)

If this helps please take time to accept the solution. Thank you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900