on 12-29-2008 9:14 AM
Hi,
For Receiver JDBC adapter,Standard structure
structure as
Statement
Tablename(TABLE1)
Action
Access
Can i make a structure like
Statement
Tablename(TABLE1)
Action
Access
fields....
Tablename(TABLE2)
Action
Access
fields......
As i am using tables and I want to insert or update both of them or one based on some conditions.
Will Insert be possible in single Statement or I have to create separate statements for each table. Can you please help me on this?
Thanks in advance
Best Regards,
Harleen Kaur Chadha
Hi Harleen
PI understand Statement occurance as a single statement and it will not accept multiple statements with single occurance of Statement field. Its how Open SQL work with XI.
If you want to perform multiple statements in one. You can use Native SQL through adapter.
<StatementName6>
<anyName action=u201D SQL_QUERYu201D | u201CSQL_DMLu201D>
<access>SQL-String with optional placeholder(s)</access>
<key>
<placeholder1>value1</placeholder1>
<placeholder2>value2<placeholder2>
</key>
</anyName >
</StatementName6>
This can also be one of the way to perform multiple tasks.
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harleen,
As already said by Dharanveer, all that you need to do is replicate the Statement level, so, istead of using this structure:
Statement
Tablename(TABLE1)
Action
Access
fields....
Tablename(TABLE2)
Action
Access
fields......
You will construct something like this:
Statement1
Tablename(TABLE1)
Action
Access
fields....
Statement2
Tablename(TABLE2)
Action
Access
fields......
And this structure will be created in a single Data Type, that will be used to create a single Message Type, that you will use in your Message Mapping, and, the 2(or more tables that you need to manipulate) will be inserted/updated without problems using this approach.
Thank you, and best regards,
Wilson
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
As i mentioned in my previous reply Statement contains Table name,Action and Column name.
Yes This information is used for Generating runtime SQL query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use multiple Statement tags. Use UPDATE_INSERT as the action.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
As you shown sturcture will work for multiple tables. You must need to repeat Structure of Whole Statement for each table, that includes Table name, Action and Fields name.
So Create multiple Statement for diffrent table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.