Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select-SQL not creating big enough field for selected da
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00113618
Message ID:
00113628
Vues:
21
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform