Super Contributor.
Super Contributor.

Filter SQL data for more than 30 columns

Hi team,


I am trying to fetch results from SQL using Select query in HP OO. There are more than 30 columns in the SQL. I need to pass all the columns values to different operations. So I am filtering by separting a new line and selecting the line.


Attached the screenshot...


If columns are added in the middle of the table in SQL, then we have a problem, values will be changed. Again need to filter almost all the columns..


Is there any better way to do..?


Can we filter data via SQL column names..?


And also can we do something via XML for this...?




Soundarajan K.



2 Replies
Absent Member.. Absent Member..
Absent Member..

Hello Soundarajan,

I am an Operations Orchestration Support representative, I will be researching according to your questions.

Please give me a bit more time and I will be back as soon as possible.


Thanks for your understanding.

Sussan Zamora


If you find this or any post useful to resolve the issue, please mark this thread as correct answer and other members can benefit with the information given
Sussan Zamora
SW Support Technical Consultant
San Jose, Costa Rica
Hewlett Packard Enterprise “
Absent Member.. Absent Member..
Absent Member..

For these kinds of queries I ended up converting my SQL header row and results into JSON objects. You can then iterate the JSON array and convert the properties to flow vars.


For example, your JSON object might look like this


{"user_name":"testuser", "rejection_reason":"because"},
{"user_name":"anotheruser", "rejection_reason":"science"},
{"<column_name>":"<column_value>", ..} ]

You can either append the SQL Next Result as you go, or do the entire result in one scriptlet step.


I built a utility flow here that executes a desired query and returns either CSV results or JSON results depending on if the input "createObjects" is set to true.


Hope that helps.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.