Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 15th, 2010, 01:50 AM
biju_ps's Avatar
biju_ps biju_ps is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 75 biju_ps User rank is Corporal (100 - 500 Reputation Level)biju_ps User rank is Corporal (100 - 500 Reputation Level)biju_ps User rank is Corporal (100 - 500 Reputation Level)biju_ps User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 10 h 31 m 7 sec
Reputation Power: 8
UPDATE OR INSERT INTO from Query

I am not able to run the following query

SQL Code:
Original - SQL Code
  1. UPDATE OR  INSERT INTO SomeTable (fld1,fld2,fld3)  VALUES
  2. (SELECT fld1,fld2,fld3 FROM someOtherTble )
  3. MATCHING (fld1) ;


It return an error
Please help me.. Thanks in advance

Edit :
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.

Reply With Quote
  #2  
Old December 15th, 2010, 02:24 AM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 50 m 14 sec
Reputation Power: 11
For Firebird valid statements are

INSERT INTO TABLE (FIELDS..) VALUES (....);

or

INSERT INTO TABLE (FIELDS) SELECT .... FROM ....

or

UPDATE OR INSERT INTO TABLE (FIELDS)
VALUES(....)
MATCHING (FIELDS)

You are trying to use some combination from all of them.

Reply With Quote
  #3  
Old December 15th, 2010, 02:44 AM
biju_ps's Avatar
biju_ps biju_ps is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2008
Posts: 75 biju_ps User rank is Corporal (100 - 500 Reputation Level)biju_ps User rank is Corporal (100 - 500 Reputation Level)biju_ps User rank is Corporal (100 - 500 Reputation Level)biju_ps User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 10 h 31 m 7 sec
Reputation Power: 8
Quote:
Originally Posted by mIRCata
For Firebird valid statements are

INSERT INTO TABLE (FIELDS..) VALUES (....);

or

INSERT INTO TABLE (FIELDS) SELECT .... FROM ....

or

UPDATE OR INSERT INTO TABLE (FIELDS)
VALUES(....)
MATCHING (FIELDS)

You are trying to use some combination from all of them.


Thanks for the quick reply.

So i cannot use the above syntax right ?
I will try to restructure my query.

regards

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > UPDATE OR INSERT INTO from Query

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap