Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How can I combine fields in a loader script

Re: How can I combine fields in a loader script

From: Peter Dickmann <pdickmann_at_de.lhsgroup.com>
Date: 2000/05/26
Message-ID: <392e78af@news.lhsgroup.com>#1/1

Use awk to combine the fields:
  awk -F, '{printf("%s,%s%s,%s\n", $1,$2,$3,$4)}' infile > outfile and set NLS_DATE_FORMAT accordingly.
Peter

Frank Heijmans <no_ftgh_at_xs4all.nl_spam> wrote in message news:ckmsisobk7mr9n21hmpqifld1u1deoadmj_at_4ax.com...
> Hi,
>
> On of my customers delivers data files in the format standing below.
> As ou can see it is a delimited format. Unfortunately the date and
> time are in seperate fields. I can combine these fields after loading
> in a third field, but that takes up a lot of space. How can I combine
> these fields in a loader script to one datetime field in the database
>
> Thanks,
>
> Frank Heijmans
>
> 99842929,20000401,09:32:09,96
> 99845281,20000401,09:44:01,36
> 99853628,20000401,10:13:28,218
> 99856439,20000401,10:24:35,80
> 99859018,20000401,10:31:10,184
> 99867987,20000401,11:00:48,116
> 99868338,20000401,11:03:10,15
> 99868407,20000401,11:03:21,17
> 99873418,20000401,11:16:48,108
> 99884653,20000401,11:49:41,72
> 99885311,20000401,18:52:24,21
Received on Fri May 26 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US