Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why this dont work
Message
 
 
À
10/10/2003 15:31:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00837628
Message ID:
00837634
Vues:
29
This message has been marked as the solution to the initial question of the thread.
Looks like VFP incorrectly determines the size of the ixnos_out column. To fix it, replace '0' in the IIF with the number of 0's in the iznos field. For example if iznos is N(7.2) than
IIF(...,..., 0000.00)
>I have this sql in view and it didn't return what I want. i have a table which aamong other field contains tip_dok (field numeric) and iznos (field numeric). i wand to separate the iznos column in wiew so if tip_dok field is 1 populate one column iznos_in, if tip_dok=2 populate the iznos_out column. So i do this...
>
>
>SELECT Spec_cek.sifra_spec, Spec_cek.data_spec, Spec_cek.docid,;
>  Spec_cek.tip_dok, Spec_cek.iznos, Spec_cek.specid,;
>  iif([spec_view_1.tip_dok]=1,spec_view_1.iznos,0) as iznos_in;
>  iif([spec_view_1.tip_dok]=2,spec_view_1.iznos,0) as innos_out;
> FROM blagajna!spec_cek;
> WHERE Spec_cek.sifra_spec >= ?pcSifraOd;
>   AND Spec_cek.sifra_spec <= ?pcSifraDo;
> ORDER BY Spec_cek.sifra_spec
>
>
>Why this dont work. If type_dok=1 it is ok, but if 2, it puts in iznos_in=0 what is OK, but in iznos_out puts * which I cant figure out why.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform