At 23:01 2009-07-17, MB Software Solutions, LLC
<[email protected]> wrote:
>Gene Wirchenko wrote:
> > I am coding some validation and I simply wish to know if
> > certain rows exist. I do not want to know what they are. Is there
> > any way of coding the select statement so I do not get any
> > results? I would just like to interrogate _tally.
> >
> > What does SELECT ... NOCONSOLE do anyway?
> > select * from ccli where clcode="GMW" noconsole
> > brought up a browse.
>Not sure I follow you, Gene, since you already know about _tally.
I do not want the results of the select. I only want to know
if any rows would be returned. The difference is between
What coins do you have in your pocket?
and
Do you have any coins in your pocket? [what I want]
>The SQL way:
>SELECT COUNT(*) as icnt FROM MyTable WHERE MyCondition = "Whatever" INTO
>CURSOR curCount
>llFound = curCount.icnt > 0
I was half-remembering being stung by faulty SQL semantics on
sum() aggregate queries like
select sum(*) from table where 0=1
which returns one row, one column with the value .null. (instead of
0). (The sum of zero numbers is zero.)
select count(*) from sometable where 0=1
returns a one-row, one-column browse with the column contents of 0, but
select sum(1) from sometable where 0=1
returns a one-row, one-column browse with the column contents of .null..
[snip]
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.