Re: Select Sum(nField) by Anders
Anders
Wed Apr 04 09:16:50 CDT 2007
SET ENGINEBEHAVIOR will cover up a number of non-standard SQL behaviors that
have been around for a long, too long, time.
Use Code references to spot the places that need changing. If this code was
in a class there
be a single place to change :).
-Anders
news:OJTzdsodHHA.588@TK2MSFTNGP06.phx.gbl...
> Got it, SET ENGINEBEHAVIOR.
>
>
> "HerbertDB" <herbertdb@nospam.com> wrote in message
> news:uz$t8UodHHA.4872@TK2MSFTNGP03.phx.gbl...
>> Can this feature be disabled? Most of my queries I add the
>> result to a variable. Since VFP9 returns Null instead on no record,
>> my variable now becomes NULL or 0.
>>
>>
>> "Anders Altberg" <anders.altberg> wrote in message
>> news:OiVXaHfdHHA.4964@TK2MSFTNGP04.phx.gbl...
>>> If you do the same from VFP against a SQL Server table you do get a row
>>> with null in your return cursor. So VFP9 is consistent with SQL Server.
>>> -Anders
>>>
>>> "HerbertDB" <herbertdb@nospam.com> wrote in message
>>> news:%23Rs7MCcdHHA.4516@TK2MSFTNGP04.phx.gbl...
>>>> Just read What New in VFP9. Its a new feature.
>>>>
>>>>
>>>> "HerbertDB" <herbertdb@nospam.com> wrote in message
>>>> news:eXCKTqbdHHA.1080@TK2MSFTNGP02.phx.gbl...
>>>>> Hi,
>>>>>
>>>>> I have a SQL command in VFP8
>>>>>
>>>>> Sele Sum(nField) from History where cEmpCode=lcEmpCode Into Cursor
>>>>> tHistory
>>>>>
>>>>> If there is no Employee that matches lcEmpCode,
>>>>> the command returns a cursor with 0 records.
>>>>>
>>>>> I used the same command in VFP9 and it returned a cursor
>>>>> with one record with a NULL value. Is this correct?
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Herbert
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>