to get this [ColName] part, you need the following statement:
LEFT([ColName],INSTR([ColName],"|")-1)
If you want to select multiple columns in one column of a recordset, you can combine everything with the following:
SELECT LEFT(ColName,INSTR(ColName,"|")-1) AS FirstValue From $TableName; UNION ALL SELECT LEFT(ColName2,INSTR(ColName2,"|")-1) AS FirstValue From $TableName;
If you want to use this in multiple columns, the script will create sql.
Nick Dewitt
source share