Re: Insert statement not properly ended.

From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1995/11/28
Message-ID: <49fbrd$qpb_at_ixnews3.ix.netcom.com>#1/1


sli_at_runner (Sijian Li) wrote:

>I have a problem, I need to generate dynamic insert SQL statement.
 

>The insert statements look like:
>insert into my_table value('MFST',44.5000,0.0000,...etc)
 

>The data are stored in a file with the format:
>Each record has 11 fields.
 

>MFST 44.5000 0.0000 0.00 625200 459 44.2500 44.500 42.7500
> 44.500 28.7500 49.000
>SYQT 9.6250 0.0000 0.00 125200 124 9.6250 9.7500 9.3750
> 9.7500 9.3750 19.625
>ORCL 45.8750 0.0000 0.00 3568600 2503 45.7500 45.875 45.1250
> 46.250 24.6250 48.750
>QCOM 43.3750 0.6250 1.46 1123200 1012 43.1250 43.375 42.2500
> 43.750 20.5000 54.750

>I got:
>ORA-00933: SQL command not properly ended
 

>But if I swap the lines in the data file, like put the MFST after SYQT, or put
>the QCOM line before the MFST line, then it MIGHT work(no garantee).
 

>In the pro*c program I wrote, I print all the insert statements and they look
>fine, any suggestion will be appreciated.

You might try using VALUES instead of VALUE.

Also, why not just use SQL*Loader with the APPEND option? It seems like this is a perfect job for it and would save you from having to write a program.

--
Chuck Hamilton
chuckh_at_ix.netcom.com

Never share a foxhole with anyone braver than yourself!
Received on Tue Nov 28 1995 - 00:00:00 CET

Original text of this message