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

Home -> Community -> Usenet -> c.d.o.misc -> SQL Loader advanced question - to reformat or not to reformat

SQL Loader advanced question - to reformat or not to reformat

From: Jeff C <jeffc_at_sympatico.ca>
Date: Mon, 31 Dec 2001 17:09:53 -0500
Message-ID: <3C30E231.6CB84088@sympatico.ca>


I have a file I want to load that looks like this; Oct 4 20:56:32 Data Begins:DST=64.228.94.203 LEN=48 DF PROTO=TCP SYN URGP=0
Oct 12 20:56:35 Data Begins:DST=64.228.94.203 LEN=48 DF PROTO=TCP SYN URGP=0
Nov 3 20:56:55 Data Begins:DST=64.228.94.203 LEN=48 PROTO=TCP URGP=0

It's log file reports and I want to load them into an Oracle table through SQL Loader. I would like to try and loading it without running it through a reformater first. My table looks like this

LOG_TS DATE
DST CHAR(16)
LEN NUMBER
DF CHAR
PROTO CHAR(6)
SYN CHAR
URGP NUMBER My first problem is the Time stamp at the beginning. The time stamp isn't surrounded by quotes. It's a variable block file and I am trying to use the space as a delimiter. I want to make sure Oracle loads "mmm dd hh:mi:ss" and not just "mmm".

The next problem I have are the DF and SYN fields. The log file is programmed to place DF or SYN when those conditions appear but if they don't they are left blank. How do I get SQL Loader to realise those fields are missing and should be null when there is only one space delimeter in the file.

If any Sqlldr genious out there knows the answer I would appreciate hearing from you. I have a feeling though I will end up programming a reformater for this before using the Sql Loader. Received on Mon Dec 31 2001 - 16:09:53 CST

Original text of this message

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