Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT-SQL problem with SUBSTR
Message
 
À
03/09/2002 13:56:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00696315
Message ID:
00696323
Vues:
11
Hi Nerissa.

The first record retrieved determines the length of the output field for the entire set. Change your SELECT to this and it should work -
select IIF("." $ objectname, ;
   PADR(SUBSTR(objectname,1,AT(".",objectname)-1), LEN(objectname)), objectname), ;
   from childtable
HTH

Dan

>Has anybody encountered an error in using SUBSTR() with SELECT-SQL code?
>
>select IIF("." $ objectname, ;
> SUBSTR(objectname,1,AT(".",objectname)-1), objectname), ;
> from childtable
>
>This code returns only up to 7 characters. I noticed that if the objectname before the period is greater than 8 chars., it outputs only 7 characters. My examples are objectname="specsupus.free","special.free","address1.free","disc.free".
>
>The statement above returns
> specsup
> special
> address
> disc
>
>Is there any flag that affects this output that I should set to ON or OFF?
>
>Thanks a lot for th ehelp.
>
>Nerissa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform