If I write a the code like this I am getting 0 count.

SELECT COUNT(*) FROM TABLE_A A WHERE A.flg IN CASE WHEN
TO_CHAR(to_date('07/08/2010','MM/DD/YYYY'),'YYYY') = '1900' THEN
'Y'
ELSE '('||''''||'Y'||''''||','||''''||'N'||''''||')'

Mainly I need when the date is 1900 then I need to select only Active flg
'Y' ELSE I need to get all data.

Please let me know Anything wrong in my statement.

-- 
Thanks & Regards
Swaroop Thailuru Swamy

-- 
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

Reply via email to