Computing.Net > Forums > Disk Operating System > Passing Var to DOS from SQLPLUS

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Passing Var to DOS from SQLPLUS

Reply to Message Icon

Original Message
Name: bengalliboy
Date: September 7, 2004 at 10:49:13 Pacific
Subject: Passing Var to DOS from SQLPLUS
OS: DOS
CPU/Ram: 333
Comment:

Greetings!
Can some one plz help.
I am runing a SQLPLUS SQL to an ORACLE db and getting a char field. It is either 'y' or 'n'. It can be '0' or some thing else.

How do I get this result to DOS and check as a variable? I need this to start another batch file execution...
TIA


Report Offensive Message For Removal


Response Number 1
Name: jubalsams
Date: September 8, 2004 at 01:35:39 Pacific
Reply: (edit)

Variable can be passed to batch on the command line. Then in batch it is %1 but you need to make the argument variable like y or n. How do you call the batch ? call it like mybatch.bat y or mybatch.bat n
Another idea ... if you could set it as an envionment variable ... those can be tested in batch file.
Or you could create a file named y or n and test for existance. Can your SQLPLUS auto create a file ?
Bet others here have much better ideas.

Best


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home








Do you have a Desktop Computer anymore?

No
Yes, but only at work
Yes, but its rarely used
Yes, and its a workhorse


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History




Data Recovery Software