
December 20th, 2007, 09:32 AM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 1
Time spent in forums: 16 m 14 sec
Reputation Power: 0
|
|
Create a prompt in sql?
Hello...
Does anyone know how to create a prompt in sql that will empower the user to plug-in their own dates? Since the format of the date is: '14-DEC-07 13:00','DD-MON-YY HH24:MI' I would like for the user to plug in a truncated date instead of the date including the time, plus the range of a complete day. I can do this using TRUNC but this adds 2 minutes to my query! Is there another way to do this?
If that is the only way, is there a way I can make it so every time a person refreshes the query, it gives them the current date only? (The users do not have access to modify the sql, so I did not want to hard code any dates within the query.)
This is how it is currently:
order.order_date between to_date('14-DEC-07 13:00','DD-MON-YY HH24:MI') and to_date('15-DEC-07 14:00','DD-MON-YY HH24:MI')
Thanks in advance for your assistance with this!
dzzy
|