You can translate the question and the replies:

Query for multiple views and record count

Hi team, I need the record count for multiple views. How can i do it in a single query?? Select count(1) From View1; Select count(1) From View2; Select count(1) From View3; Select count(1) From View4; Thanks!
20-01-2022 20:23:02 -0500

1 Answer

Hi, In order to obtain the list of all views along with their row count, you could follow the below steps in the Virtual DataPort Administration Tool: * Create a JDBC(Denodo) datasource and choose the database adapter: Denodo Virtual DataPort 8.0. Provide your Denodo server configuration details and perform a TEST connection. * Under the Denodo Datasource, create a base view using the “[Create from query](” option and specify the query with the interpolation variable for database name and view name. * select count(*) from @database_name.@view_name * Create a separate view from the VQL Shell over the Pre-Defined Stored Procedure GET_VIEWS: * Create view <View_Name> as select * from GET_VIEWS() * Create a [Join view]( for the above two views. The join will be on the fields database_name, view_name from GET_VIEWS() and database(interpolation variable name), view(interpolation variable name). Execute the view for desired results. Also, if you wish to have the row count of the views for a particular database you could specify the database name under the [Where Clause]( of the join view. Hope this helps!
Denodo Team
21-01-2022 06:11:21 -0500
You must sign in to add an answer. If you do not have an account, you can register here