Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Rows Affected
Tue, Mar 21 2006 3:21 PMPermanent Link

"Allan Brocklehurst"
Hi ;
Why do I get 1 row affected when I run the  following on an empty table
SELECT MAX(EncounterNo) AS MaxBAse FROM "PatientEncounter"
WHERE [PatientID] = '000057809';

Tia

Allan


Tue, Mar 21 2006 3:24 PMPermanent Link

"Allan Brocklehurst"
I forgot : stats v4.22 latest build

"Allan Brocklehurst" <brock@ns.sympatico.ca> wrote in message
news:E53A3027-9084-460B-BC3D-65E9023E5453@news.elevatesoft.com...
> Hi ;
>  Why do I get 1 row affected when I run the  following on an empty table
> SELECT MAX(EncounterNo) AS MaxBAse FROM "PatientEncounter"
> WHERE [PatientID] = '000057809';
>
> Tia
>
> Allan
>
>
>

Tue, Mar 21 2006 4:49 PMPermanent Link

Aage Johansen
Allan Brocklehurst wrote:
> Hi ;
>  Why do I get 1 row affected when I run the  following on an empty table
> SELECT MAX(EncounterNo) AS MaxBAse FROM "PatientEncounter"
> WHERE [PatientID] = '000057809';

My guess: according to std. SQL.
You'll get one row where MaxBase is Null.

--
Aage J.
Wed, Mar 22 2006 8:21 AMPermanent Link

"Allan Brocklehurst"
Thanks Aage.  I 'll keep that in mind.

Allan
"Aage Johansen" <aagjohan@offline.no> wrote in message
news:25CA84EE-49C1-4DA8-9B20-2E21BFDCEFC6@news.elevatesoft.com...
> Allan Brocklehurst wrote:
> > Hi ;
> >  Why do I get 1 row affected when I run the  following on an empty table
> > SELECT MAX(EncounterNo) AS MaxBAse FROM "PatientEncounter"
> > WHERE [PatientID] = '000057809';
>
> My guess: according to std. SQL.
> You'll get one row where MaxBase is Null.
>
> --
> Aage J.
>

Image