missing select keyword on executing .sql from unix [message #409754] |
Tue, 23 June 2009 20:16 |
anya_03
Messages: 7 Registered: June 2009
|
Junior Member |
|
|
Hi,
I am trying to execute a .sql from unix.the .sql scripts consists of a delete part and a merge part. The delete part works fine but the merge part gives me an error. When I execute the merge statement in the database using PL/SQL Developer, it works fine. But when I execute through sqlplus from unix, it throws this error:
SP2-0042:unknown command ")"src - rest of line ignored.
SP2-0042:unknown command "on" - rest of line ignored.
Error at line 1:
ORA-00928:missing SELECT keyword
I have attached my script here.
Pls advise. Why is it so that it is working fine in the database but not through unix.
Thanks.
-
Attachment: Merge.sql
(Size: 4.04KB, Downloaded 2280 times)
|
|
|
|
Re: missing select keyword on executing .sql from unix [message #409986 is a reply to message #409767] |
Wed, 24 June 2009 12:34 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
One syntax error to start with...
...
merge into tar
using
( select distinct set1.EXTRACT,
set1.ACTION,
set1.PLATFORM,
set1.APPL,
set1.BEN_ID,
set1.EFF_DATE,
set1.END_DATE,
set1.MAJOR,
set1.ASO,
set1.FSA <--- missing comma
lkp1.SOLD,
set1.CUST_ID,
...
|
|
|
|
Re: missing select keyword on executing .sql from unix [message #410016 is a reply to message #409754] |
Wed, 24 June 2009 19:47 |
anya_03
Messages: 7 Registered: June 2009
|
Junior Member |
|
|
Hi, I am really sorry about the missing comma, I had edited the column names and reduced their number (the actual script has around 50-60 columns) to include in the forum, so the missing comma is my mistake here while pasting, forgive me for that. The script is working absolutely fine in PL/SQL Developer because I am executing it manually these days to process my jobs. But in sqlplus, it is throwing me the "missing select keyword" error and I really am puzzled as to what could be causing this error?
|
|
|
Re: missing select keyword on executing .sql from unix [message #410019 is a reply to message #409754] |
Wed, 24 June 2009 20:04 |
anya_03
Messages: 7 Registered: June 2009
|
Junior Member |
|
|
Sorry for the inconvenience on account of my being a newbie. I hope I have taken care of all that you asked for now.
1.My Oracle version is 10g - 10.2.0.3.0
2.I got the exact same error while executing the merge statement from SQL*Plus after "set echo on".
SP2-0042 unknown command ") SRC"- rest of line ignored
SP2-0042 unknown command "ON"- rest of line ignored
error at line 1:
ORA-00928:missing Select keyword
|
|
|
|