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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set sqlplus variable based on query 1

Status
Not open for further replies.

etprash

MIS
Nov 19, 2007
13
0
0
US
Hi,
I need to set a sqlplus variable using a query (since the value is stored in database). It would be something like this:
Code:
define v_req_id = <select request_id from my_table>
HOST uuencode '&v_req_id' a.txt|/usr/lib/sendmail <email id>
Would it be possible.
I tried using ACCEPT but was not able to make it work.
Thanks a lot for your input.
-Prashant
 
ETPrash,

Here is some code you can use:
Code:
col v_req_id new_value v_req_id
select request_id v_req_id from my_table;
HOST uuencode '&v_req_id' a.txt|/usr/lib/sendmail <email id>
Let us know how this works for you.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top