Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why doesn't this work?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Why doesn't this work?
Divers
Thread ID:
00259423
Message ID:
00259423
Vues:
46
I have a field in a table with values like "T1110X" and "T1110.12". I want to extract just the number part, which always starts on space 2. So I do ?TRAN(VAL(SUBS(myField,2))). For each field it works great showing: "1110" and "1110.12" respectively. Here's the weird part: If I use a SELECT statement: SELECT TRAN(VAL(SUBS(myField,2))) FROM myTable WHERE !empty(myField) -- for the same records I get "11" and "11". Why wouldn't this work? As a work around I am doing: SELECT LEFT(TRAN(VAL(SUBS(myField,2))),15)..... and it works fine. Can anyone teach me something here? I figure I wasted so much time on this, I should at least learn something out of it!

TIA,
Marcus.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform