Author |
Message
|
varshasvin |
Posted: Mon May 12, 2008 2:41 am Post subject: Query to insert multiple data in Oracle through ESQL |
|
|
Newbie
Joined: 27 Feb 2008 Posts: 9
|
Anybody knows the syntax of query to insert multiple rows in the database?
I have tried following query in Database System :
Insert into STG_OUTPUT (SYSTEM_ID,SEQUENCE_ID,ITEM_CODE)(select SourceSystem,Accounting_Doc_Line_Item_No,Line_Item_Code from Environment.Variables.OutputLineItem);
This query is running into database directly but the same query is not running through ESQL code. When added this statement in ESQL its giving Syntax error to that line.
Please help me for this. What is the correct syntax for inserting multiple rows in database through ESQL? |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon May 12, 2008 2:52 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
use PASSTHRU functionality to execute the same SQL on MB(ESQL)
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
varshasvin |
Posted: Mon May 12, 2008 3:02 am Post subject: Inserting Batch of data into database |
|
|
Newbie
Joined: 27 Feb 2008 Posts: 9
|
I have tried with PASSTHRU but...that is also giving runtime exception that "Invalid Database specification "
Can u tell me any other way to insert the Batch or chunks of data into database. |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon May 12, 2008 3:07 am Post subject: Re: Inserting Batch of data into database |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
varshasvin wrote: |
"Invalid Database specification "
|
This is a different issue, you could be given some wrong database name
Post the PASSTHRU ESQL statement here
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
varshasvin |
Posted: Mon May 12, 2008 3:19 am Post subject: |
|
|
Newbie
Joined: 27 Feb 2008 Posts: 9
|
PASSTHRU 'Insert into STG_ZGLUPLOAD_OUTPUT (SYSTEM_ID,SEQUENCE_ID,ITEM_CODE)(select SourceSystem,Accounting_Doc_Line_Item_No,Line_Item_Code from Environment.Variables.OutputLineItem)' TO Database.{ext_chr_InputDB}.{ext_chr_InputSchema}. |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon May 12, 2008 5:38 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Just try this
PASSTHRU('INSERT INTO STG_ZGLUPLOAD_OUTPUT (SYSTEM_ID,SEQUENCE_ID,ITEM_CODE)
(select SourceSystem,Accounting_Doc_Line_Item_No,Line_Item_Code from ?) TO Database.{?}.{?}' ,
Environment.Variables.OutputLineItem,
ext_chr_InputDB,
ext_chr_InputSchema)
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
|