Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create a field in sql
Message
 
À
19/01/2011 10:22:03
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 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01496561
Message ID:
01496564
Vues:
38
This message has been marked as a message which has helped to the initial question of the thread.
>I'd like to create a new field in an sql statement.
>I use this:
>
>
>SELECT  table1.netto, table1.brutto,;
>(IIF(table1.netto==table1.brutto, table1.netto,0)) as netto2,;
>FROM table1;
>INTO CURSOR table2 READWRITE 
>
>
>My problem:
>I'd like to create the field 'netto2' to be same as the field 'netto'. The field 'netto' is N(8,2).
>If netto and brutto in the first record of table1 is not equal, the netto2 field of table2 becomes N(1,0).
>How can I make it N(8,2) too?
SELECT  table1.netto, table1.brutto,;
(IIF(table1.netto==table1.brutto, table1.netto,00000.00)) as netto2,;
FROM table1;
INTO CURSOR table2 READWRITE 
Good Luck
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform