Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select-SQL not creating big enough field for selected da
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00113618
Message ID:
00113628
Views:
22
>I'm getting the name of the month with the following code in a select-sql from a table with totals for products shipped per day:
>
>select distinct val(substr(shipdate,1,2)) as month_num,cmonth(ctod(shipdate)) as month
>
>The field in the resulting table seems to be limited to the size of the first entry i.e. fieldsize = len(January). So all I get for the next month is Februar.
>
>Is there any way to stop this from happening?
>
>
>TIA
>
>E.R. Gilmore

Sure:

Do "PADR(cmonth(ctod(shipdate)),9) AS month" clause. The length of 9 is for "September", the longest length.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform