Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fullpath + Filename
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00777149
Message ID:
00777425
Vues:
10
Hi Sergey,

Thank you very much. It worked.

By the way, I appreciate your tips.

Have a great week,
Ali

>>Hi Sergey,
>>
>>You are right, but the problem occurred when I created a cursor on a field which contains file names. Fullpath() returns the current path for all the records.
>>
>>
 SELECT Distinct fullpath(Names) AS FileNames  FROM  MyTable;
>>                WHERE NOT allt(TableNames) == ""  INTO CURSOR Tables
>>
>>Did I make a mistake or what?
>>
>Ali,
>
>I still not sure what the problem is but thre're a couple things you can change in your query. First, strip trailing spaces from the value passsed to FULLPATH() function. Second, Pad result of FULLPATH() function so it wouldn't be truncated. Third, use EMPTY() function to check if field is empty. If you want it be rushmore optimizable, you can change it to WHERE TableNames = SPACE(LEN(TableNames))
SELECT Distinct PADR(fullpath(ALLTRIM(Names),60) AS FileNames ;
>  FROM  MyTable ;
>  WHERE EMPTY(TableNames) ;
>  INTO CURSOR Tables
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform