- for l_i from (pos(',', row)) to (length(row))\r
- if (mid(row,1,l_i) = ',') increment l_iCount\r
+ for l_i from l_iOffset to (length(row))\r
+ move (mid(row,1,l_i)) to l_sChar\r
+ if (l_sChar = ',') begin\r
+ increment l_iCount\r
+ \r
+ if (l_iMaintainTypes = 1) begin\r
+ //All columns start off as numeric\r
+ while (length(l_sTypes) < l_iCount)\r
+ append l_sTypes "1"\r
+ loop\r
+ //If we encounter a non-numeric value when we have defined numeric switch the type\r
+ if ((mid(l_sTypes,1,l_iCount) = "1") and not (is_number(l_sBuf))) begin\r
+ move (overstrike("0",l_sTypes,l_iCount)) to l_sTypes\r
+ end \r
+ move "" to l_sBuf\r
+ end\r
+ end\r
+ else if (l_iMaintainTypes = 1);\r
+ append l_sBuf l_sChar\r