How to query table count from oracle DB and display the result in appian screen?
I have used the below "Query Database" smart service to fetch the number of table count from DB. But I receive the below error:
"You should enter only a single query in a row."
My query - SELECT COUNT(1) AS NO_OF_TABLE_CNT FROM USER_TABLES;
Please help me to get the table count. Is there any other option available apart from using this Query Database smart service?
Discussion posts and replies are publicly visible
Remove the semi-colon to alleviate the "single query" error in the Query DB node.
You can also connect a CDT to the USER_TABLES object, just as you would to any other table/view object, then utilize a!queryEntity with paging (1,1), and the totalCount will tell you the number of tables.
Also to confirm, USER_TABLES will contain the tables OWNED by your account, to get the "total table count in the DB" you would need to reference ALL_TABLES.