Computing.Net > Forums > Windows 2000 > text file editting in a batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

text file editting in a batch file

Reply to Message Icon

Name: Dan
Date: May 31, 2002 at 10:30:13 Pacific
Comment:

I'm creating a batch fall that runs sqlplus. I want the batch file to either dynamically create the sql to include a variable as one of the criteria in the sql file. Can I either create the file dynamically or can I basically find and replace certain text in the sql file.

Example:
@echo off
sqlplus crap/crap@server @extract.sql
echo You are about to delete this record
echo Hit ctrl+c to cancle
pause
sqlplus crap/crap@sserver @delete.sql

this is the batch file I created to run to sql files to extract a record and then delete that record. I have to manually edit these sql files to change a ID PK and I would like to pass a variable on to sql so I could run it like
crap.bat 123 and automatically change that ID PK into the 123. Sorry if I confused anyone but help would be much appreciated.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: text file editting in a batch file

Reading input from a batch file www.computing.net/answers/windows-2000/reading-input-from-a-batch-file/51608.html

Saving a line in a text file as %G% www.computing.net/answers/windows-2000/saving-a-line-in-a-text-file-as-g/54650.html

Setting vars in a batch file BY THE www.computing.net/answers/windows-2000/setting-vars-in-a-batch-file-by-the/36503.html