INSERT with SELECT shows a: Error 618: Expected ','

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Dec 3 18:03:58 CST 2003


on 12/3/03 5:34 PM, Srinivas Yalamarti at syalamar at fiberlink.com wrote:

Hi Srini,

> I am trying to execute an INSERT with SELECT SQL using ViSQL.
> 
> The insert statement itself works fine - eg.,
>            INSERT INTO TABLE_A  (CUST_NAME, CUST_NUM)  VALUES ('jondoe',
> 100)
> 
> The select statement itself works fine - returns rows - eg.,
>           SELECT CUST_NAME, CUST_NUM FROM TABLE_B
> 
> The two put together doesn't :
>           INSERT INTO TABLE_A (CUST_NAME, CUST_NUM) VALUES (SELECT
> CUST_NAME, CUST_NUM FROM TABLE_B)
> 
> It shows an:  Error 618: Expected ','
> 
> Is there anything wrong with the syntax?  Does Valentina support executing
> this kind of SQL?

In Valentina SQL.pdf there is special part on this type of query.
Page 6.


You do not need word VALUES


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list