Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get the full path of a the currently executing script

Status
Not open for further replies.

goaway1234

Programmer
Jun 2, 2004
78
US
I am charged with reviewing our change management procedures at my company. We already have a database script template that records bug/issue information when a script is run (just a few lines of code saved above the actual changes), and I would like to expand this information to include the file path of the updaate script.

Does anybody know whether it is possible to write a function that will return the path of the currently executing file (if any). The goal is that if in sql*plus, the user types @ C:\scripts\XXX.sql then the function returns 'c:\scripts\XXX.sql'.
 
In the unix world, there is a "which" command. In Windows, there is no equivalent, although there are cheap and free Unix lookalikes which can be installed on Windows.
-------------------------
The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top