December 15th, 2010, 01:50 AM
UPDATE OR INSERT INTO from Query
I am not able to run the following query
UPDATE OR INSERT INTO SomeTable (fld1,fld2,fld3) VALUES
(SELECT fld1,fld2,fld3 FROM someOtherTble )
MATCHING (fld1) ;
It return an error
Please help me.. Thanks in advance
Error Showing: Invalid token. Dynamic SQL Error. SQL error code = -104. Token unknown - line 3, column 2. SELECT.
Firebird version 2.1 On Windows Xp prof.
Last edited by biju_ps; December 15th, 2010 at 01:58 AM.
December 15th, 2010, 02:24 AM
For Firebird valid statements are
INSERT INTO TABLE (FIELDS..) VALUES (....);
INSERT INTO TABLE (FIELDS) SELECT .... FROM ....
UPDATE OR INSERT INTO TABLE (FIELDS)
You are trying to use some combination from all of them.
December 15th, 2010, 02:44 AM
Thanks for the quick reply.
Originally Posted by mIRCata
So i cannot use the above syntax right ?
I will try to restructure my query.