Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Better way to create blank numeric col in view
Message
 
 
À
29/05/2008 11:42:34
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 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01320265
Message ID:
01320267
Vues:
18
In VFP9 you can use CAST() function.

>Hi all,
>
>I have a need in a view to create a 3 digit wide blank numeric column that is filled in after the view is queried. The only way I could figure out how to do this is to insert an IIF() in as an expression to the view designer something like this (this is the resulting SQL SELECT):
>
>
>
>SELECT Quotes.*, IIF(.T.,000,000) AS Years ;
>   FROM Quotes...
>
>
>
>The problem is, the view designer wants to keep stripping out the extra zeros if you edit the view so that it becomes IIF(.T.,O,O) and I end up with a 1 digit wide column created...which causes numeric overflow. I don't want to have to switch to using a character column as that would be a lot of grief. Any better way to get a multi-digit column from within the view designer?
>
>Thx.
>Albert
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform