Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with Oracle's VARCHAR2 data type
Message
De
17/02/1999 15:06:37
 
 
À
17/02/1999 13:55:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00188551
Message ID:
00188600
Vues:
17
>When I use VFP to insert a record into the view with a key of “123”, I get
>"123__________" ( 123 followed by 10 spaces. 13 characters total length) in
>the Oracle table. The client side application can’t deal with the trailing
>spaces and won’t find the records. So, any ideas on how to trim the data the
>VFP places into the Oracle table?


David,

If the Oracle field usually pads to the left, you could try padding the data before your update eg:

lcMyKey = PADL(lcMyKey, 13, ' ')

which would give you "__________123". Of course, you'd still need to ensure that your lookup value corresponded, either by PADL'ing it as well, or by using one of the TRIM funcs. If the Oracle field usually pads right, you could compare against VAL(lcKeyField).

-Bernie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform