Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL SELECT--how to create empty field of a specified typ
Message
 
 
To
07/07/2006 22:27:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01134627
Message ID:
01134628
Views:
19
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform