Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SELECT--how to create empty field of a specified typ
Message
 
 
À
07/07/2006 22:27:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01134627
Message ID:
01134628
Vues:
22
This message has been marked as the solution to the initial question of the thread.
SELECT CAST(0 AS Y) AS MyNewCurrencyColumn FROM MyTable INTO MyCursor
* or
SELECT $0.00 AS MyNewCurrencyColumn FROM MyTable INTO MyCursor
>I want to do something like this:
>
>SELECT 0 AS MyNewCurrencyColumn FROM MyTable INTO MyCursor
>
>but I want MyNewCurrencyColumn to be a currency type.
>If there were any currency columns in the table, I could do this:
>
>SELECT SomeCurrencyColumn * 0 AS MyNewCurrencyColumn FROM MyTable INTO MyCursor
>
>But what if there are no currency columns in the table?
>Is there anyway to select a literal and use the AS clause and specify the data type?
>
>Thanks
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform