question

fchickering avatar image
fchickering asked

Understanding query syntax

Can you explain this command SARADAP_APPL_DATE(+) <= TO_DATE(DECODE(appl_date_parm,null,'31-DEC-9999', appl_date_parm),'DD-MON-YYYY') AND SARAPPD_APDC_DATE <= TO_DATE(DECODE(appl_date_parm,null,'31-DEC-9999', appl_date_parm),'DD-MON-YYYY': SARADAP_APPL_DATE is an application date. SARAPPD_APDC_DATE is an application decision date. It looks like the filter is selecting an application date that is less than or equal to an application date parameter AND the application decision date is less than or equal to an decision date parameter. This is sql from banner oracle. I am writing a report in rapid insight veera and want to ensure I am using the same filter. Thx.
oraclefilter
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
@SQLShark avatar image
@SQLShark answered
Hi, You might get a faster response if you use an Oracle forum, however. Take a look here at the [DECODE][1] So your decode is say when appl_date_parm IS NULL then return '31-DEC-9999' other wise return the appl_date_parm . Hope that helps [1]: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions040.htm
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@SQLShark avatar image @SQLShark commented ·
Is this also in your WHERE statement? As I recall (+) denotes a left outer join. So this would be your join criteria.
0 Likes 0 ·
fchickering avatar image fchickering commented ·
Very much appreciated. Thank you.
0 Likes 0 ·
Fatherjack avatar image Fatherjack ♦♦ commented ·
If you have an answer that solves your problem please use click the tick mark to the left of the answer so that other people know that the solution was helpful
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.