Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    sql object - insert data from xpath stmts extract using designer service and sql objs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
sql object - insert data from xpath stmts extract using designer service and sql objs
 Login/Join
 
Member
posted
In iway designer, I have two objects. a service object to extract data from an xml document that is processed by the PF. After extracting that information, I am trying to use the sql object to insert this dynamic data into a sql table.

My table is

CREATE TABLE [dbo].[wrtest](
[wrcode] [xml] NULL
) ON [PRIMARY]

my sql insert statement is in a procedure like this


A. create procedure sp_update_xml (@xmltp xml) - where this would be the xpath extract output for idoc_tp
as
INSERT INTO [BTS_Support].[dbo].[wrtest]
([wrcode])
VALUES

('idoc_tp,xml')

B.
INSERT INTO [BTS_Support].[dbo].[wrtest]
([wrcode])
VALUES ('idoc_tp,xml') < where this would be the xpath extract output for idoc_tp

where 'idoc_tp' is an xpath output from name = idoc_tp and xpath statement = XPATH(/sap:INVOIC02/IDOC/EDI_DC40/RCVPRN)used in a service object extract

I am not sure what is the best way to setup the sql object insert. Just a plain insert with a runtime parameter from the xpath extract with the xml document or as a stored procedure with a runtime variable

either way, I don't have all of the proper syntax to use in the designer/sql object to dynamically take xpath output and use as a runtime parameters to insert data into a table.


iWay 5.5 smsp1

windows 2003
 
Posts: 6 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
Hi petepeters,

I passed this one to our iWay people and heard the response: this seems like involved issue, so the best channel for assistance would be to open a case with Information Builders' Customer Support Services. You may either call at 1-800-736-6130, or access online at InfoResponse at any time.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Gold member
posted Hide Post
Hi Pete,
Not sure I have grasped your question completely, so apologies if this isn't what you're asking..!
To pass values dynamically to static SQL in an SQL object, code the "Statement" tab like this:

INSERT INTO [BTS_Support].[dbo].[wrtest]
([wrcode])
VALUES ('?idoc_tp,xml')

The question mark signifies that the value is to be collected dynamically.

Now add an entry on the "User Defined Properties" tab of the SQL object:

Name = idoc_tp
Type = string
Value = XPATH(/sap:INVOIC02/IDOC/EDI_DC40/RCVPRN)

So I guess you wouldn't need the first service object to extract the XPATH value anymore either.

Apologies if I've sent you on a goose chase.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
 
Posts: 59 | Location: Birmingham, Blighty | Registered: October 30, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    sql object - insert data from xpath stmts extract using designer service and sql objs

Copyright © 1996-2020 Information Builders