In this condition, if doc status is "R" and parameter date minus 10feb2014 is positive figure then doc status will be considered as authorised "A"
Regards, Ashish On 24-Feb-2014 11:35 PM, "Sagar Thakkar" <saagar.thak...@gmail.com> wrote: > HI can some explain the case function below specially the DECODE (SIGN > (TO_DATE (:P_CHK_RECD_TO, 'DD/MM/RRRR') - > (TO_DATE('10/02/2014','DD/MM/RRRR'))), 1, 'A') = 'A' > > WHERE CASE > WHEN Y.DOC_STATUS = 'R' AND DECODE (SIGN (TO_DATE > (:P_CHK_RECD_TO, 'DD/MM/RRRR') - (TO_DATE('10/02/2014','DD/MM/RRRR'))), 1, > 'A') = 'A' > THEN > 'A' > WHEN Y.DOC_STATUS = 'A' > THEN > 'A' > ELSE > 'R' > END = 'A' > > On Friday, August 12, 2011 3:45:41 AM UTC+3, JK wrote: >> >> The decode always returns the date format in DD-MMM-YY format whereas I >> want it to return in MM/DD/YYYY format. >> >> select decode(to_date(to_char(SYSDATE,'YYYYMM'),'YYYYMM'),' >> 000000',null,to_date(to_char(SYSDATE,'YYYYMM'),'YYYYMM')) from dual. >> >> As of now, when I type this I do not have a proper SQL editor to test the >> syntax. Hence it may not be correct. However, I could run the decode query >> in TOAD at my work and that is when I saw it is returning in DD-MMM-YY >> format. I hope you got some idea as to what my requirement is. Looking >> forward to your help. >> >> >> Thanks in advance. >> > -- > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to Oracle-PLSQL@googlegroups.com > To unsubscribe from this group, send email to > oracle-plsql-unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Oracle PL/SQL" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to oracle-plsql+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en --- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To unsubscribe from this group and stop receiving emails from it, send an email to oracle-plsql+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.