Home » SQL & PL/SQL » SQL & PL/SQL » Inserting script name in table?
Inserting script name in table? [message #314835] Fri, 18 April 2008 00:04 Go to next message
Messages: 36
Registered: April 2008
I have myscript.sql
That inserts the rows in the table, table also has the column that wanted to contain the name of the script that inserted the row, in this case its myscript.sql.
How can I insert the script name in the column, how can I get the script name in the sql script?
I don’t want to hardcode that since, if the script name changes then I have to change the hardcoded value. Also I want to copy the script name to something else and run second script in parallel.

Re: Inserting script name in table? [message #314839 is a reply to message #314835] Fri, 18 April 2008 00:17 Go to previous message
Messages: 21146
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't know how to do that. However, if you move code written in that script into a stored procedure, you might be able to store a procedure name into the table.

If something like this satisfies your needs, check this AskTom article about knowing who you are and who called you.
Previous Topic: AVG per hour
Next Topic: dynamically create table
Goto Forum:

Current Time: Thu Aug 17 22:18:33 CDT 2017

Total time taken to generate the page: 0.11985 seconds