Home » SQL & PL/SQL » SQL & PL/SQL » logic in single SQL query
logic in single SQL query [message #252577] Thu, 19 July 2007 04:02 Go to next message
cgk_js
Messages: 48
Registered: December 2005
Member
i need the following logic to be implementeed in the single SQL query.

for the date feild say "adjust_date" if the value is there 1 should be returned from the SQL query.
If the value is null then 0 should be retunred.

eg:

select adjust_date from <table>
where <clause>
Re: logic in single SQL query [message #252588 is a reply to message #252577] Thu, 19 July 2007 05:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Have a look at NVL function.

Regards
Michel
Re: logic in single SQL query [message #252622 is a reply to message #252577] Thu, 19 July 2007 07:56 Go to previous message
joy_division
Messages: 4641
Registered: February 2005
Location: East Coast USA
Senior Member
And the DECODE function.
Previous Topic: ORA-01843: not a valid month Error
Next Topic: TRUNCATE PARTITION
Goto Forum:
  


Current Time: Wed Dec 07 08:39:14 CST 2016

Total time taken to generate the page: 0.09222 seconds