on 01-24-2011 11:00 AM
Hi,
I am using xMII version 11.5. I need to pass the output of a SQL Query as a input to another SQL Query in BLS. If I hard code I am able to get the answer but if I try using param in the Links its not working.
Sweety
Hi Sweety,
The output of your SQL Query is usually in XML format. But inputs to a SQL Query Param property are usually strings. What does your link editor show for the mapping? Are you grabbing the contents of a single node and passing that string to the Param property? Or are you grabbing chunks of xml (which will not work)?
Please post the expression editor contents here.
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sweety,
Well.. You can configure XPATH expression (Configure Object) of Repeater to output of SQL Query 1.
Example: "<SQL Query1 Name>.Results{/Rowsets/Rowset/Row}"
Then, assign "<Repeater Name>.Output{/Row/<Column Name>}" to Param.1 variable of SQL Query 2.
Hope this helps.
Best Regards,
Kedar
Hi Mike,
This is the output of the Repeator First time : [INFO ]: 301
301 is given as an input to Second Query.
The output is found in the Tracer after the Second Query but when i add a Repeator2 after the Second Query, the rows are not found in the Configure Object. Only Columns are found.
This is the Output of second Query in the Tracer:
[INFO ]: <?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2011-01-27T12:28:02" EndDate="2011-01-27T12:28:02" StartDate="2011-01-27T11:28:02" Version="11.5.3"><Rowset><Columns><Column Description="ActualProduction" MaxRange="1" MinRange="0" Name="ActualProduction" SQLDataType="4" SourceColumn="ActualProduction"/></Columns>
<Row><ActualProduction>600</ActualProduction></Row>
<Row><ActualProduction>550</ActualProduction></Row>
<Row><ActualProduction>800</ActualProduction></Row>
<Row><ActualProduction>400</ActualProduction></Row>
</Rowset></Rowsets>
Sweety
Can you show us the configured link for the input of the second repeater? Is it pulling from the first repeater or from the query results downstream from the first repeater?
I envision that you have something like this:
SQL Query action block:
Repeater with input configured as: SQL_Query_0.Results{/Rowsets/Rowset/Row}
Second SQL Query action block with Param.1 set as Repeater_0.Output{/Row/Plant}
And your second repeater's input would be SQL_Query_1.Results{/Rowsets/Rowset/Row}
So what do you expect your second repeaters output to be:
In tracer for 1st pass: (Repeater_1.Results{/Row/ActualProduction}]) 600
2nd pass: 550
3rd pass: 800
...
Is this the correct scenario?
Regards,
Mike
Hi Mike,
What you have said is correct...The second Repeator is taking input from the second query.. but the rows are not found in the links..
I m able to get the Rows from the second query only when i hard code in the configure links by setting the param value.
If i link the output of the first repeator to to the second query I m not able to get the output in the second query.
Regards,
Sweety
Hello Sweety,
In addition to Mike's suggestions,
Not sure but quite possible that datatype mismatch might be an issue too and its worth a check
Please let us know which Database are you using and what are the datatypes of the fields that you are passing to from BLS?
Hope this helps!!
Regards,
Adarsh
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.