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

sql command not ended.. multiple queries

Status
Not open for further replies.

gtjr92

Programmer
May 26, 2004
96
I am having a brain cramp as i have done this several times in the past.
I want to run multiple queries just one after another.
I either get ERROR at line 1:
ORA-00911: invalid character if i have ; to end line one, or if i remove ; from line 1 i get
sql command not properly ended properly.
I am using sql plus

Code:
update smdr_asw set smbtel='9372576314' where smbtel='TRK0760000';
update smdr_asw set smbtel='9372571110' where smbtel='TRK0AB0000';
update smdr_asw set smbtel='9372571110' where smbtel='TRK0AF0000';
update smdr_asw set smbtel='9372571110' where smbtel='TRK0530000';
update smdr_asw set smbtel='9372968314' where smbtel='TRK0810000';
update smdr_asw set smbtel='9372571138' where smbtel='TRK0CC0000';
update smdr_asw set smbtel='9372571138' where smbtel='TRK0C10000';
update smdr_asw set smbtel='9376562917' where smbtel='TRK0640000';
update smdr_asw set smbtel='9372577742' where smbtel='TRK0B70000';
update smdr_asw set smbtel='9372577725' where smbtel='TRK0B00000';
update smdr_asw set smbtel='9372572834' where smbtel='TRK0A40000';
update smdr_asw set smbtel='9372579071' where smbtel='TRK0650000';
update smdr_asw set smbtel='9372579071' where smbtel='TRK0440000';
update smdr_asw set smbtel='9372574711' where smbtel='TRK04A0000';
update smdr_asw set smbtel='9372576314' where smbtel='TRK07C0000';
update smdr_asw set smbtel='9379041950' where smbtel='TRK0D80000';
update smdr_asw set smbtel='9379041951' where smbtel='TRK0D90000';
update smdr_asw set smbtel='9379041887' where smbtel='TRK0C50000';
update smdr_asw set smbtel='9372577178' where smbtel='TRK0A20000';
update smdr_asw set smbtel='9372577178' where smbtel='TRK0940000';
update smdr_asw set smbtel='9372573551' where smbtel='TRK0C20000';
update smdr_asw set smbtel='9372574499' where smbtel='TRK0450000';
update smdr_asw set smbtel='9372575076' where smbtel='TRK0480000';
 

Create a script file with the statements and execute in SQL*Plus using the at (@) command:

SQL>@MyScript.sql

[3eyes]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
worked thanks. hate that though
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top