Multiple Table Insert - pls. help... [message #392480] |
Wed, 18 March 2009 03:13  |
Maverick27
Messages: 84 Registered: October 2008
|
Member |
|
|
Somebody pls. help with SYNTAX of multiple table insert.
It's complaining of 'missing expression'
INSERT
INTO MST_ITEM_IMAGE (VC_COMP_CODE,
VC_DEFAULT_COMP,
VC_ITEM_CODE,
VC_SUP_ITEM_CODE,
VC_UNIT,
LG_ITEM_IMAGE,
DT_MOD_DATE,
VC_AUTH_CODE)
VALUES (SELECT VC_COMP_CODE,
VC_DEFAULT_COMP,
VC_ITEM_CODE,
VC_SUP_ITEM_CODE,
VC_UNIT,
LG_ITEM_IMAGE,
DT_MOD_DATE,
VC_AUTH_CODE
FROM ITEM_IMAGE);
|
|
|
|
Re: Multiple Table Insert - pls. help... [message #392484 is a reply to message #392483] |
Wed, 18 March 2009 03:19   |
Maverick27
Messages: 84 Registered: October 2008
|
Member |
|
|
Michel Cadot wrote on Wed, 18 March 2009 03:15 | Oracle is certainly right.
Reread documentation.
Copy and paste your SQL*Plus session.
Format it with code tags.
Format your query with indentation, use SQL Formatter for instance.
Regards
Michel
|
Thanks Michel - sorry don't have the slightest clue what you are talking about... is there anything wrong with syntax ??
|
|
|
|
|
|
Re: Multiple Table Insert - pls. help... [message #392512 is a reply to message #392493] |
Wed, 18 March 2009 04:35   |
Maverick27
Messages: 84 Registered: October 2008
|
Member |
|
|
JRowbottom wrote on Wed, 18 March 2009 03:47 | You an either use INSERT... VALUES(...) to insert a single row, or INSERT...SELECT... to insert multiple rows - the two syntax cannot be combined.
|
Thank u Sir !!
Have got syntax for INSERT...SELECT...
Can;t seem to find it anywhere
Mave
|
|
|
|
|
Re: Multiple Table Insert - pls. help... [message #392525 is a reply to message #392480] |
Wed, 18 March 2009 04:57  |
cookiemonster
Messages: 13965 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Should also point out that there is a Multiple table insert in oracle but that's not what you're trying to use.
Multiple table insert inserts into multiple tables.
Getting the terminology right will get you answers faster.
|
|
|