|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32,
Visits: 46
|
|
Howdy folks,
I just had a query from a user where he is using FastExport and wants to state what delimiter the output file should use. I have had a look on-line, consulted the FastExport user guide, and it appears that you cannot specify this, like you can in FastLoad.
Is the only way to achieve this to use an AXSMOD or INMOD procedure?
Many thanks!
Andrew Livingston
Andrew C. Livingston
Teradata Certified Professional and Trainer
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 9/11/2007 7:46:00 AM
Posts: 4,
Visits: 1
|
|
Here is what I've done, just add the delimiter in my query, not elegant but it's work!
select first_col(char(0)), ';' (char(1)) etc... from my_table
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32,
Visits: 46
|
|
Zebulon,
Interestingly enough, that is exactly what one of the DBA suggested.
It is a much simpler method that writing an OUTMOD function. The only drawback I can see is that it still inserts the tab, but as long as the application you are importing to is set to recognise another delimiter it should be fine. Also, depending on the size of the txt file, you can always do a bulk find/replace.
Many thanks for your post!
Andrew
Andrew C. Livingston
Teradata Certified Professional and Trainer
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 5/29/2008 1:27:36 PM
Posts: 43,
Visits: 48
|
|
I typically do the following, in order to eliminate the TABs:
select CAST(first_col AS CHAR(N)) || ';' || CAST (second_col AS CHAR(N)) || etc... from my_table
where "||" is the concatenation operator.
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32,
Visits: 46
|
|
Fabio,
Excellent! I don't think I would ever have even thought of that. Looking at the code, yes, that would work a treat.
Many thanks for your suggestion!
Andrew
Andrew C. Livingston
Teradata Certified Professional and Trainer
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/18/2008 6:19:15 AM
Posts: 29,
Visits: 14
|
|
select CAST(first_col AS CHAR(N)) || ';' || CAST (second_col AS CHAR(N)) || etc... from my_table
We can also do like this
select CAST(first_col AS CHAR(N))
,cast(';' as char(1))
,CAST (second_col AS CHAR(N))
, etc...
from my_table
Sushant Paricharak
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/26/2008 8:52:45 AM
Posts: 32,
Visits: 46
|
|
Sushant!
Arguably a better approach, as this would give you absolute control over the placement not only of delimiters, but of the actual data as well. Using this FE script would help write the FastLoad script.
Thanks!
Andrew
Andrew C. Livingston
Teradata Certified Professional and Trainer
|
|
|
|