Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date in sql statement returns 0 or 1
Message
De
24/05/2011 11:00:52
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01511582
Message ID:
01511606
Vues:
67
>>try
>>
>>
>>SELECT 	padr(IIF(EMPTY(incep_date), "", DTOC(incep_date)), 10)  AS incep_date, ;
>>	padr(IIF(EMPTY(anniv_date), "", DTOC(anniv_date)) , 10) AS anniv_date, ;
>>	padr(IIF(EMPTY(term_date), "", DTOC(term_date)), 10)  AS term_date ;
>>FROM myTable ;
>>INTO CURSOR myCursor
>>>
>
>Oops and I was bitten by that problem just recently!
>
>Of course, you're right, VFP determines the length of the column based on the first column value. Another solution will be to use
>
>cast(... as C(10))

Well, I was kind of surprised you didn't think of that
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform