Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL doesn't format the way I want
Message
 
 
To
13/03/2001 14:48:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00484563
Message ID:
00484568
Views:
19
>>Hi everybody,
>>
>>I have a table with cYear, Period and other fields. cYear is 4 character representation of the year, Period is 2 chars field. 01-12 for months.
>>
>>The result of Query should have Year (N 2) field - 2 last digits and Period (N 2)
>>I tried select val(right(cYear,2)) as Year, val(Period) as Period ..., but it formats the result to be N 2.2 Is it possible to change without messing around with set decimals?
>>
>>It's URGENT!
>>
>>Thanks a lot in advance.
>
>
>How about:
>
>
select <b>int(</b>val(right(cYear,2))) as Year, <b>int(</b>val(Period)) as Period
Once again, STUPID ME! Thanks a lot.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform