Reputation: 29
So I have a query that displays the name of the day of the week and the wine that went with that day. The problem I have is that I only want to display data from Tuesday. How would I go about doing that?
select to_char(res_date, 'DAY'), wine from DSS_TEST;
Upvotes: 0
Views: 77
Reputation: 94884
To limit your result set use a WHERE clause. You can use TO_CHAR to get the day and compare it to a literal. Only be aware of two things:
Having said this:
select to_char(res_date, 'FMDAY'), wine
from DSS_TEST
where to_char(res_date, 'FMDAY', 'NLS_DATE_LANGUAGE=AMERICAN') = 'TUESDAY';
Upvotes: 1