Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When SELECT SUM()... doesnt
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00999926
Message ID:
00999955
Vues:
38
Don,

I agree with Cetin, SQL Server behaves this way too:
create table #temp1 ( i1 int, c1 char(10) )
insert into #temp1 values ( 1, 'test' )
insert into #temp1 values ( 2, 'test' )
insert into #temp1 values ( 3, 'test1' )

select sum( i1 ) 
   from #temp1
   where c1 = 'hi'
sometimes standards break non-standard behavior *g*

>Under VFP8, even if no records matched the "MyResult.FinalValue" was always coming back as a valid numeric value, even if it was zero.
>
>However, under VFP9, if no records qualified the where clause, the value came back as NULL. So... caution if you may have something like this and a possible no qualified results be sure to check for NULL...
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform