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

load from sql in a script

Status
Not open for further replies.

dodge20

MIS
Jan 15, 2003
1,048
US
Hello

I have a script that takes input, then runs 2 sql statements. I am getting a syntax error when I run the second sql statement. I am wondering if it doesn't like the load from. Can anyone point me in the right direction. The first one runs fine, but then I get a syntax error on line 1 near position 1.

Here is the sql:


echo "\nEnter MEDIA ID: \n"
read media
echo "\nEnter media id: \n"
read mediab

cd /usr/ias/bin
isql soils - <<TEXTA
delete from ht_zips
where htz_media_id = &quot;$media&quot;;

cd /user/helen/zips
isql soils - <<TEXTB
load from &quot;$mediab&quot;.zips
insert into ht_zips;


Dodge20
 
I have it working. The problem was changing directories between queries. I changed where I stored my data, and it solved the problem.

Dodge20
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top