Forums

This topic is locked

search for variable in whole table

Posted 13 Jul 2001 09:51:51
1
has voted
13 Jul 2001 09:51:51 Hans Gelok posted:
<font face='Verdana'>I would like to search for a variable/word not only in one collumn (of a table), but for example in 2 collumns at one time.

I tried this, but...:
SELECT *
FROM Autos
WHERE Auto1 = 'MMColParam' AND Auto2 = 'MMColParam'

Any ideas?</font id='Verdana'>

Replies

Replied 13 Jul 2001 10:57:59
13 Jul 2001 10:57:59 Dark Psycho replied:
Hmmm it has to be somthing like this i think

SELECT*
From Autos
WHERE Collumname LIKE '%varSearch%' OR collumname LIKE '%varSearch'% ....

Variabels
Name: varSearch
Default Value:0123456
Run-Time Value: Request("name of the field who passes the variable/word"

I think this should do it
ps: Repeat : OR collumname LIKE '%varSearch'% as much as you want

Greet DarKPsyChO

The Power Is In The Code
Replied 13 Jul 2001 11:00:12
13 Jul 2001 11:00:12 Dark Psycho replied:
whoops made a typing mistake
it is '%varSearch%' in stead of '%varSearch'%

<img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
Greetd DarKPsyChO

The Power Is In The Code

Reply to this topic