Rick, Just to correct your 3rd statement in case you misunderstood or I mistyped my first post... != NULL is represented as IS NOT NULL and not just NOT NULL when equating to NULL Similarly, = NULL is represented as IS NULL Joe
----- Original Message ---- From: Rick Cook <[EMAIL PROTECTED]> To: arslist@ARSLIST.ORG Sent: Tuesday, September 16, 2008 1:18:11 PM Subject: Re: Help with Oracle select statement ** Thanks, guys, for your advice. After taking it, it seems to work! Mistakes I had: 1) semicolon at end - didn't know that Remedy added that automatically. 2) Hadn't converted colons to underscores. 3) Maybe the != vs NOT, we'll see once I get some data in there. Thanks again guys, I appreciate it! Rick On Tue, Sep 16, 2008 at 10:09 AM, Eaton, Mark (DCS) <[EMAIL PROTECTED]> wrote: ** You should also put single quotes around $100002257$ and remove the semi-colon at the end. Remedy will take care of that for you. ________________________________ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Joe DeSouza Sent: Tuesday, September 16, 2008 10:04 AM To: arslist@ARSLIST.ORG Subject: Re: Help with Oracle select statement ** 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"