i need to display when code=10 then delqdays has to be greater than 30 else dont display
I used
select * from abc WHERE DelqDays >=( CASE WHEN IN (10) THEN '30' END )
Plz help
i need to display when code=10 then delqdays has to be greater than 30 else dont display
I used
select * from abc WHERE DelqDays >=( CASE WHEN IN (10) THEN '30' END )
Plz help
Originally Posted by ak99
Code:select * from abc WHERE DelqDays >= 30 AND code =10
Thanks for your helpOriginally Posted by Krandor
I think there is some misunderstanding,,it does not have filter on anything but except when code=10,,so it diplays everything when code is something else besides 10 but when code=10,,then delqdays has to be equal or greater than 30.
try that
select * from abc WHERE 'Y' = case
when code = 10 then case when delqdays =>30 then
else 'N' end
else 'Y' end
GK
__________________________________________________ _____
if you found this post is useful click scale(right side on this reply ) and agree
You can make nested case where
SELECT CASE WHEN code = 10 THEN delqdays =>30
else "N" end
Become Part of This Conversation
Join NowFor Free!