|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Wildcard in where clause
I'm making a program with VB 6 and using ms access as database.
I'm having a small problem with a query, so I was wondering if it's possible to have a wildcard in the where clause, like this "SELECT * FROM mytable WHERE mytable.* LIKE '" & keywords.TEXT & "'" I tried that one but it didn't work. I could of course separate all table columns and make their own LIKE-condition for each and every column, like this.... "SELECT * FROM mytable WHERE product LIKE '" & keywords.TEXT & "' OR product_name LIKE '" & keywords.TEXT & "'.... etc ... but I'd rather find a way to use the wildcard thing. All ideas are welcome. Thank you in advance - Kimppa
__________________
Fatal error on row 561: Couldn't access life - life isn't set |
|
#2
|
||||
|
||||
|
you cannot use a wildcard for the columns in a WHERE clause
you need the LIKE condition on each column separately don't forget your wildcard character, which is * for Access also, please post Access questions into the Database Management forum next time, this is the SQL Server forum |
|
#3
|
|||
|
|||
|
Thanks...
And sorry for the wrong forum, didn't even notice it myself :-) |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Wildcard in where clause |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|