Expand my Community achievements bar.

JDBC Query Single Row service Parse Query

Avatar

Former Community Member
Using JDBC Query Single Row service on an Oracle database,

I specify a SQL statement like this:

select abc, to_char(aDate, 'MM/DD/YYYY') from xyz where def = 123



then I click the "Parse Query" button to try to map the query results to my variables, but the mapping window gives me 3 fields instead of 2:

1. abc

2. to_char(aDate)

3. 'MM/DD/YYYY'



how do I let it understand that there are only 2 fields in the results so that I can map it properly?



thanks
5 Replies

Avatar

Former Community Member
I think you could still map to the 2 fields, though it is giving you the option of 3 fields to map,this sounds like a bug but should not prevent you from mapping to the 2 fields

Avatar

Former Community Member
Got a new minor issue unrelated to the above, but I don't want to flood this forum with another new topic, so I'll stick this new thing here.



I have a very simple process that only contains this JDBC Query Single Row service.



In this query single row service, at the bottom of the property sheet, there's a section where it says "number of rows retrieved"...



now, if I map this 'number of rows' to a variable (I set the variable's type as "int"), when I call my process (as a web service), it returns me nothing... all the output parameters are empty.



If I remove the mapping of "number of rows", that is, there's nothing in that bottom section. Then my process works correctly, all the output variables contain correct data from my database.



Has anybody encountered this? what's your solution please?

Avatar

Former Community Member
btw, I was using it to query against an Oracle database.



My LC-ES environment is Windows/WebSphere/SQL-Server.

Avatar

Former Community Member
that probably is right because the output of the webservice is going to be the number of rows returned,I usually have a branch to check if the number of rows returned is > 0

Avatar

Former Community Member
the problem is that if I use that 'number of rows' feature, I get no data in the query results... (if I don't use that 'number of rows', then I get good results from the service)