Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why this dont work
Message
 
To
10/10/2003 15:31:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00837628
Message ID:
00837633
Views:
32
This message has been marked as a message which has helped to the initial question of the thread.
>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.

change the 0 to 0000 if iznos is n(4), or 000 if iznos is n(3), etc..
Tracy
Previous
Reply
Map
View

Click here to load this message in the networking platform