Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select Sql and signed integer
Message
De
12/02/2005 04:10:00
 
 
À
12/02/2005 03:09:54
Suhas Hegde
Dental Surgeon
Sirsi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00986239
Message ID:
00986242
Vues:
12
>hi
>how can is achive what i want?
>
>
>create cursor foo (f i)
>insert into foo values(112)
>insert into foo values(11)
>insert into foo values(-11)
>insert into foo values(-121)
>
>select IIF(f>=0,f,0) as a1, IIF(f < 0,f,0) as a2 from foo
>select IIF(f>=0,f,0) as a1, IIF(f < 0,-f,0) as a2 from foo
>select foo
>browse
>
>
>
>what i see in the returned cursor are '*' where the negative integers are present
>
>I want the integers to appear in its place instead of the *
>
>Tia
>suhashegde
clear
create cursor foo (f i)
insert into foo values(112)
insert into foo values(11)
insert into foo values(-11)
insert into foo values(-121)

select f*IIF(f>=0,1,0) as a1, f*IIF(f < 0,1,0) as a2 from foo
LIST STRUCTURE

* if you want integer fields ( fixed on VFP9 )
CREATE CURSOR result (a1 i,a2 i)
INSERT INTO (ALIAS());
SELECT f*IIF(f>=0,1,0), f*IIF(f < 0,1,0) from foo
browse
LIST STRUCTURE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform