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