Highlighted
Super Contributor.
Super Contributor.
692 views

Is there any option to capture the number of returned from DB Query execution

Jump to solution

Hi,

We are execuing the DB queries using Webservice protocol, with lr_db_dataset_action statement of Print option we are getting only the first 100 records to logs, is there any option to print full dataset to logs?

 

or any option to save the "Number of records in dataset  " to any parameter?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.
Super Contributor.

We can get the Number of rows fetchd fom the DB execution Query.

 

Refer the lr_db_executeSQLStatement example in Vugen Functionla reference.

 

Once got the Rows count we can use loop to print the required columns and required number os rows  using  lr_db_getvalue funtion.

View solution in original post

0 Likes
2 Replies
Highlighted
Super Contributor.
Super Contributor.

We can get the Number of rows fetchd fom the DB execution Query.

 

Refer the lr_db_executeSQLStatement example in Vugen Functionla reference.

 

Once got the Rows count we can use loop to print the required columns and required number os rows  using  lr_db_getvalue funtion.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Hello,

 

Actually, I have the same type of problem, but I would need to get the whole result of the function ld_db_dataset_action, since I run a complex sql query and I need to get the column names of the response that include aliases.

 

I mean I would need to store the result in a variable rather than in the logs ouput. 

 

Is there a way to have the column names of the query?

 

Thanks in advance,

 

Gilles

0 Likes
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.