Hi Fabio,
no this is only a solution for the special case. Think on all possible ways to declare a SQL SELECT.
All what I know about the problem is, that the definition of a field in a SELECT Statement ends where a ',' occur which is not inside any construct delimtied by (),[],'',"".
try yours with
sqlcmd="SELECT aField,bField AS Field2, "First,Second"+[ , ]+PADR(cField ,2) AS cField ..."
The last field ends at FROM, but again not at a FROM in String delimiters
sqlcmd="SELECT aField,bField AS Field2, ALLTRIM("FROM,Second ")+[ , ]+PADR(cField ,2) AS cField FROM .."
>Hi Agnes,
>
>uses "external domain tokens" algoritm:
>
>
sqlcmd="SELECT aField, bField AS Field2, [, ]+PADR(cField,2) AS cField ..."
>
>? STRTRAN(STRTRAN(strtran(m.sqlcmd,"[, ]",CHR(1)),", ",","+CHR(13)+" "),CHR(1),"[, ]")
>
>but i think you want this:
>
>
? STRTRAN(STRTRAN(strtran(m.sqlcmd,"[, ]",CHR(1)),", ",","+CHR(10)+" "),CHR(1),"[, ]")
>
>
>Fabio
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]