G
Gomer
How can I send a parameter I read inside of a PERL script to a SQL
script.
For example, I have the following:
chomp ($login_name = uc(<STDIN>));
Now, I want to send that $login_name to a SQL script. I'm doing
something like the following:
$sql = "declare \n";
$sql .= " v_new_pswd varchar2(20); \n";
$sql .= "begin \n";
$sql .= " v_new_pswd := db_login.crypt_passwd('NEW_PASSWORD'); \n";
$sql .= " update table set pswd = v_new_pswd where user_id =
'$login_name'; \n";
$sql .= "end; \n";
$sql .= "/ \n";
$sql .= "commit; \n";
@output = run_sql_query ($login,$password,$sql);
I'm using some libraries that came with my system so I know that
everything is working correctly except that the login_name isn't being
passed.
How can I format the login_name so it's correctly interpreted in
my SQL script?
Thanks,
Gomer
script.
For example, I have the following:
chomp ($login_name = uc(<STDIN>));
Now, I want to send that $login_name to a SQL script. I'm doing
something like the following:
$sql = "declare \n";
$sql .= " v_new_pswd varchar2(20); \n";
$sql .= "begin \n";
$sql .= " v_new_pswd := db_login.crypt_passwd('NEW_PASSWORD'); \n";
$sql .= " update table set pswd = v_new_pswd where user_id =
'$login_name'; \n";
$sql .= "end; \n";
$sql .= "/ \n";
$sql .= "commit; \n";
@output = run_sql_query ($login,$password,$sql);
I'm using some libraries that came with my system so I know that
everything is working correctly except that the login_name isn't being
passed.
How can I format the login_name so it's correctly interpreted in
my SQL script?
Thanks,
Gomer