Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select
Message
 
 
À
06/04/2010 12:47:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Re: Select
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01458778
Message ID:
01458956
Vues:
40
This message has been marked as a message which has helped to the initial question of the thread.
I think you don't need the second part at all.

Anyway, as I said, apply NVL function.

It should be
replace ty2010 with NVL(AcrsYTD.YTD,0) && - no error message anymore
>hi,
>
>
>select T.ID,T.Nam, T.ID1, (select sum(Y2010) as YTD from NewTest T1 WHERE   T1.ID#0  AND T1.Nam = T.Nam and T1.ID1 <= T.ID1 ) as YTD from ;
>   NewTest T into cursor crsYTD
>     
>   update NewTest set ty2010 = NVL(YTD,0) ;
>         from NewTest inner join crsYTD YTD on NewTest.ID1 = NewTest.ID1 and NewTest.Nam = crsYTD.Nam
>
>BROW&&work
>
>local lnRecNo
>lnRecno = 1
>select NewTest
>scan 
>if between(m.lnRecno, 1, reccount('crsYTD'))
>
>   goto lnRecno in crsYTD
>   replace ty2010 with (AcrsYTD.YTD)&&error message
>   endif
>   lnRecno = lnRecno + 1
>ENDSCAN
>
>>>HI,
>>>
>>>i get the same error,
>>>i need this code to replace newtest.ty2010 with (AcrsYTD.YTD)
>>>
>>>
>>
>>Post your current code. Did you apply NVL function where appropriate?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform