And when comparing null you use 
IS NOT NULL
Or
IS NULL

Joe



----- Original Message ----
From: Rick Cook <[EMAIL PROTECTED]>
To: arslist@ARSLIST.ORG
Sent: Tuesday, September 16, 2008 12:56:47 PM
Subject: Re: Help with Oracle select statement

** 
OK, that makes sense, thanks.  I think I'm close, but would like someone with 
more knowledge than I to take a look at my conversion and tell me why it's not 
working. 

Here's the original in a Query menu: (Selecting Tier 1 of a Category/Type/Item)

( 'Generic Categorization Tier 2' = $1000000745$) AND ( 'Generic Categorization 
Tier 1' = $1000000744$) AND ( 'Generic Categorization Tier 3' !=  $NULL$ ) AND 
( 'Category Status' = "Enabled") AND ( 'Category Type' = $1000002257$)

I am attempting to add the Order by qualification and do it from a SQL menu.  
Here's what I have so far:

SELECT Generic_Categorization_Tier_1 FROM CIS:HPD:Menu_Item_Ranking WHERE 
(Generic_Categorization_Tier_1 != NULL) AND (Category_Status = 'Enabled') AND 
(Category_Type = $1000002257$) ORDER BY Usage desc;

I get an error saying ORA-00933: SQL command not properly ended.

Rick


On Tue, Sep 16, 2008 at 7:35 AM, Wallace, Kelvin <[EMAIL PROTECTED]> wrote:

** 
Rick,
 
Try this:
 
SELECT field1 FROM form ORDER BY field2 DESC;
 
Kelvin
 

________________________________

From:Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] 
On Behalf Of Rick Cook
Sent: Tuesday, September 16, 2008 10:16 AM 

To: arslist@ARSLIST.ORG
Subject: Help with Oracle select statement
 
** 
Am looking to get some specific syntax on a SQL call ARS 7 to Oracle 9 that 
would do the following: 


Select field1 from Form order by field2 (field2 is int field.  I want the sort 
done highest value to lowest)

Thanks!

Rick




_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to