homepage Welcome to WebmasterWorld Guest from 54.225.57.156
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Select statement..with a twist
Can this be done?
wruk999




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

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




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

How about:

AND status <> 4

aspdaddy




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

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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved