Home » SQL & PL/SQL » SQL & PL/SQL » about substitution parameter
about substitution parameter [message #210716] Fri, 22 December 2006 00:29 Go to next message
sandeepshahare
Messages: 20
Registered: December 2006
Location: pune
Junior Member
i have one subtitution parameter(&&exdate)and i want to use this at differt positions in the query without user giving the input each time for single execution of query.

when i use &&empno then the value is fixed for that parameter as that of first value but i want the user should give new value at the time of each execution of query.

how i can give a new value for exdate at each time?

select *
from (select trunc(to_date('&&exdate','dd/mm/yyyy'))+level
from dual
connect by level<= (add_months(trunc(to_date ('&&exdate','dd/mm/yyyy'),'month'),1)-
trunc(to_date('&&exdate','dd/mm/yyyy'),'month')))
/

[Updated on: Fri, 22 December 2006 00:32]

Report message to a moderator

Re: about substitution parameter [message #210719 is a reply to message #210716] Fri, 22 December 2006 00:52 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
You can use
undefine exdate
at the end of your script.
By
Vamsi
Previous Topic: SQL query help
Next Topic: Sum of last 3 transactions
Goto Forum:
  


Current Time: Sun Dec 04 04:14:44 CST 2016

Total time taken to generate the page: 0.12821 seconds