-
Hi there,
Could anyone tell me how to get the else part of a DECODE statement to do nothing.
e.g.
select
country, town,
MAX(DECODE(trunc(Sysdate)-Check_Date , 1 , number, 2, number, 3, number, 4, number, 5, number, 6, number, 7, number , NULL)) ThisWeek
from table
group by country, town
This statement will display the number if the sysdate - the check_date (date of input) = 1,2,3,4,5,6,7 (this week's data) else it will show nothing in the ThisWeek column,
What I want is - if the criteria isn't true not to display the line atoll.
Any help would be great.
Many thanks
Alison
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|