Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Select statement..with a twist

Can this be done?

     

wruk999

10:23 am on Mar 22, 2003 (gmt 0)

10+ Year Member



Hi There,

I need to run a SELECT command on a table in my database, but instead of it being


SELECT * FROM table_name WHERE 1 AND status = 4

I need it to do the opposite, and select, when the status isn't 4?

I tried


SELECT * FROM table_name WHERE 1 AND status!= 4

but it didnt work. (there was a space before the "!", WW removed it)

Does anyone know the parameter for this?

Regards,
William.

JuDDer

10:25 am on Mar 22, 2003 (gmt 0)

10+ Year Member



How about:

AND status <> 4

aspdaddy

10:28 am on Mar 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you can use 'not equal' or 'not in' in most versions of SQL.

<filedname> <> 4
<filedname> not in (4)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month