Home » SQL & PL/SQL » SQL & PL/SQL » Help w/ DECODE
Help w/ DECODE [message #227577] Wed, 28 March 2007 12:37 Go to next message
Messages: 3
Registered: March 2007
Junior Member
I have a table that has a location number and 7 more fields that I use to indicate if a particular text files is supposed to be generated on a given day of the week.

I need help with a query that will tell me if the file should be created based on the current day of the week. So, return a YES (or some other value) if we should create the file or NO if not.

I think it will end up as a large DECODE statement but I'm not certain. I would use CASE but we are running Oracle

20025 1 0 1 1 1 1 1

Using this example, since today is Wednesday and the WED_SW = 1 then return some value.

I can do this using PL/SQL if that would make it easier.

[Updated on: Wed, 28 March 2007 12:38]

Report message to a moderator

Re: Help w/ DECODE [message #227595 is a reply to message #227577] Wed, 28 March 2007 14:02 Go to previous message
Messages: 25577
Registered: January 2009
Location: SoCal
Senior Member
See response in other forum.
Previous Topic: using variable in a query!!!
Next Topic: Conditional Query
Goto Forum:

Current Time: Mon Aug 21 11:02:10 CDT 2017

Total time taken to generate the page: 0.10122 seconds