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
McLan
Messages: 36
Registered: April 2008
Member
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.

Cheers,
McLan
Re: Inserting script name in table? [message #314839 is a reply to message #314835] Fri, 18 April 2008 00:17 Go to previous message
Littlefoot
Messages: 21823
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: Sun Feb 09 08:58:08 CST 2025