cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
480
Views
0
Helpful
3
Replies

DB Get and select count(*)

bdecout
Level 1
Level 1

I need to find out how many records of type X I have in the database.

Since select count(*) is not supported , I was thinking of using something like

SELECT count(distinct(XXX)) from YYY (xxx are unique values)

Is it possible to assign the returned result to a variable and how.

DB Get only seems to be able to get columns values.

Thanks

3 Replies 3

gmarogi
Level 5
Level 5

I am just wondering if the query Select AgentsLoggedOn from Peripheral_Real_Time will give the count.

No for my purpose.

I'm accessing my own SQL database and need to find out the number of rows for specific queries.

The only way I've found to do this, is to loop on DB Get until I get "No data"

Not efficient , but it works for what I need

try to create a view :

create view nbRowfromYYYY

as

SELECT count(distinct(XXX))as NbRow from YYY

then use the DB Read step (select NbRow from nbRowfromYYYY), then the DB Get step.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: