Re: Syntax for embedded sql



I am trying to run my script. It does the truncate table part

SQL> select count(*) from coboltest;

COUNT(*)
----------
0

Elapsed: 00:00:00.01

When it tries to do the first insert, I get the error message below.
01 SQ0001 GLOBAL.
02 FILLER PIC X(25) VALUE "truncate TABLE COBOLTEST".


01 SQ0002 GLOBAL.
02 FILLER PIC X(150) VALUE "insert into
COBOLTEST(MBRSEP,IMA
- "XSOFT13_PATH_01,IMAXSOFT13_SEQ_NO)(select MBRSEP ,0 ,0
f
- "rom MBRSEPMSTR where MBRSEP<>'0000000000' order by
MBRSEP)".

EXEC SQL INSERT INTO COBOLTEST
( MBRSEP, IMAXSOFT13_PATH_01, IMAXSOFT13_SEQ_NO)
(SELECT MBRSEP, 0, 0
FROM MBRSEPMSTR
WHERE MBRSEP != '0000000000'
ORDER BY MBRSEP)
END-EXEC.
CALL "SQLADR" USING SQ0002 SQL-STMT
MOVE 1 TO SQL-ITERS
MOVE 20 TO SQL-OFFSET
MOVE 0 TO SQL-OCCURS
CALL "SQLADR" USING
SQLCUD
SQL-CUD
CALL "SQLADR" USING
SQLCA
SQL-SQLEST

06/15/05 BEGIN BILLING DATABASE SORT 08:13 AM

ORACLE ERROR DETECTED:

ORA-00907: missing right parenthesis

Does anyone have any thoughts of what I am doing wrong? I am kind of
out on an island with nobody to go to! Any help would be greatly
appreciated.

.



Relevant Pages

  • Re: creating DBMS_PROFILER reports
    ... Okay... ... Then theprofsum.sql script and I get all kinds of errors such ... truncate table plsql_profiler_line_rollup ... SQL> select runid, substras run_comment, ...
    (comp.databases.oracle.server)
  • Truncate table Permission to User
    ... How do I write script is SQL 2005 to give a user - truncate table permission ...
    (microsoft.public.sqlserver.programming)
  • Re: TRUNCATE TABLE @table_name
    ... truncate and then do a bulk insert into, Is this possible in SQL ... Server 2000 or do script each table individually. ...
    (comp.databases.ms-sqlserver)
  • Re: Vista hosting XPe tools/db
    ... Are you running this script on the machine that actually has the SQL server ... machine hosting the database. ... i don't know if you can install a second instance of SQL ...
    (microsoft.public.windowsxp.embedded)
  • Re: ActiveX script works in DTS but not in job, why?
    ... Account that SQL Agent runs under and it is a Local Admin on the box. ... As another test I saved the script as a .vbs file and tried running it, ... Microsoft OLE DB Provider for SQL Server ... that would be since I need to be able to load DTS packages from either a SQL ...
    (microsoft.public.sqlserver.dts)