Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Padding with
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01116422
Message ID:
01116433
Vues:
15
>>>Help me out here, guys. My brain's turned to mush.
>>>
>>>- I'm importing an XLS -> dbf
>>>- a numeric val from the XLS becomes a string val in the dbf
>>>- I need to express this as a 4-char field, right justified and prefilled with "0"s
>>>
>>>So 13 -> "13" and I need "0013"
>>>
>>>I can't seem to get it right, using different permutations of STR( X, 4) and PADL( X, 4, "0").
>>>
>>>I either end up with "" or "13"
>>>
>>>Any quick ideas before I go home?
>>>
>>>'ppreciate it
>>>
>>>Incidentally, I'm adding to this old FPD 2.6 system. But I'm testing the module in VFP7 where I can work more quickly. When I import in 7, the num field becomes a num, which I have to STR(). When I compile and link in FPD, and run the exe, I get a mismatched var error, cos the num field has become a char, and so doesn't need STR()ing.
>>>
>>>So it would seem that the functionality of IMPORT has changed.
>>>
>>>Terry
>>
>>
>>? TRANSFORM(13,[@L 9999])
>>
>
>Thanks BB. That works fine too. But I think Tamar just pipped you to the post :-)
>
>Cheers
>
>Terry

lol
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform