I figured as much but am wanting to make things better.
I never thought of adding the WHERE LIMIT=1 to the code.
That may make some of my code faster. Thanks for the information.
I love this list.

James Belisle

Making Information Systems People Friendly Since 1990
[cid:[email protected]]

From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef
Sent: Friday, March 06, 2015 9:05 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: SELECT COUNT

Oh lord if I had a penny for every SELECT COUNT(*) that's in my code,
it would add up to make me a millionaire!  I am a firm believer in adding
"WHERE LIMIT = 1" so that it stops counting as soon as it hits one record
if that's all you need to know.

Karen



-----Original Message-----
From: Jim Belisle <[email protected]<mailto:[email protected]>>
To: RBASE-L Mailing List <[email protected]<mailto:[email protected]>>
Sent: Fri, Mar 6, 2015 8:40 am
Subject: [RBASE-L] - SELECT COUNT



I use a lot of  SELECT COUNT(*) codes to check if information is in tables for

processing, especially if I am printing multiple reports within a WHILE ENDWHILE

loop.

Of course along with that would be IF THEN or CASE statements to

determine whether to print a report.

Is this the best and most efficient way to

accomplish this task?

I am just trying to make things faster and more efficient

(and less likely to "Break" the code during processing).



James

Belisle



Making Information Systems People Friendly Since

1990

[cid:[email protected]<mailto:[email protected]>]


Reply via email to