infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
return number of rows from a query
System
Originally posted by Rick Pritchett
Need to know how to get the number of rows returned by a query using the odbc drivers.
Find more posts tagged with
Clovertech
Comments
Charlie Bursell
SELECT COUNT(*) FROM MYTABLE WHERE X = 'Y'
david_barr
I think that depends on the type of query that you are doing.
Looking at one of our queries, we use SQLExecDirect to execute the query, then we repeatedly call SQLFetch to fetch each row until SQLFetch returns SQL_NO_DATA_FOUND. If I wanted to count the rows returned, I'd probably just keep a counter that I incremented each time we successfully called SQLFetch.