|
Archives of the TeradataForumMessage Posted: Thu, 25 Apr 2002 @ 18:59:51 GMT
I am hoping someone has encountered this problem before and can assist. I have a comma delimited varying length file. This is not all. Each delimited item is surrounded by double quotes ("). I know how to do a delimited file but I want to eliminate the double quotes on the way in (before inserting into table); The file is like this: "abc"," "," ","1234","SH"," 0 "," 0","Heading 1234", " 0" "def"," "," ","1234","DL"," 0 "," 0 "," 0"," 0" .field HierarchyMain * VARCHAR(03); .field HierarchySub01 * VARCHAR(03); .field HierarchySub02 * VARCHAR(03); .field CostCenter * VARCHAR(07); .field ReportType * VARCHAR(01); .field Q1 * VARCHAR(18); /* Numeric */ .field Q2 * VARCHAR(18); /* Numeric */ .field Q3 * VARCHAR(18); /* Alpha-Numeric for "SH" = records and Numeric for "DL" records */ .field Q4 * VARCHAR(18); /* Numeric */ This is a sample of the fields. One field (Q3) is different depending on whether it is a header ("SH") or detail ("DL") record. Is there a simple way to eliminate the quotes and trim spaces from the input or would I do better to preprocess using a procedural language. I intend to load to a temporary table and then process to a permanent table (ignoring "SH" records). Thanks in advance for any suggestions Dara
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||