Hi All,
In a table, I have a character field called DESCRIP which look like:
xx bb zzz kk
x bbb zzzz kkk
xxx bb zzz kk
xx b zzz k
I want select Xs, Bs, Zs and Ks into four different fields and each value is separated by a space.
Whenever I write:
Select left(DESCRIP, AT(" ", DESCRIP,1)-1) as FLDX,.....
FLDX's length is determined by length of first record's X length (2 chars here) and setting FLDX length to 2.
Has anybody got a clue how to get strings without being trimmed without using a UDF or PADR (i.e PADR(left(DESCRIP, AT(" ", DESCRIP,1)-1), 20, " " )) ?
Help is much appreciated
Foxbldr
In a table, I have a character field called DESCRIP which look like:
xx bb zzz kk
x bbb zzzz kkk
xxx bb zzz kk
xx b zzz k
I want select Xs, Bs, Zs and Ks into four different fields and each value is separated by a space.
Whenever I write:
Select left(DESCRIP, AT(" ", DESCRIP,1)-1) as FLDX,.....
FLDX's length is determined by length of first record's X length (2 chars here) and setting FLDX length to 2.
Has anybody got a clue how to get strings without being trimmed without using a UDF or PADR (i.e PADR(left(DESCRIP, AT(" ", DESCRIP,1)-1), 20, " " )) ?
Help is much appreciated
Foxbldr