Go Back  IT Forums > Software > Oracle
User Name
Password
Reply
 
Thread Tools Search this Thread Display Modes

SQLLoader - Contenate and continueif
  #1
Old 02-10-2005, 06:09 PM
Guest
Guest


Guest's Info
Posts: n/a
Default SQLLoader - Contenate and continueif

I have to load the following data into a table with same structure

Cd Text
AA AAAAAAAAAAAAAAAAAAAAAAAAAAA
BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCC
DD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
EE EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
FF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFF
GG GGGGGGGGGGGGGGGGGGGGGGGGGGG


The table has 2 columns - cd, text.

The length of text in the table is varchar2(1000).

The file has only 40 characters of text for each line. If the length
exceeds 40 characters, it is moved to the next line as for the CC and
FF.

The texts across mutliple lines should be concatenated into one record

Is there an option to do this through sqlldr?

Reply With Quote
SQLLoader - Contenate and continueif
  #2
Old 02-10-2005, 07:40 PM
Daniel Morgan
Junior Member


Daniel Morgan is offline
Daniel Morgan's Info
Join Date: Aug 2004
Posts: 0
Default SQLLoader - Contenate and continueif

rajesh.garigipati@gmail.com wrote:
Quote:
I have to load the following data into a table with same structure Cd Text AA AAAAAAAAAAAAAAAAAAAAAAAAAAA BB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB CC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCC DD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD EE EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE FF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFF GG GGGGGGGGGGGGGGGGGGGGGGGGGGG The table has 2 columns - cd, text. The length of text in the table is varchar2(1000). The file has only 40 characters of text for each line. If the length exceeds 40 characters, it is moved to the next line as for the CC and FF. The texts across mutliple lines should be concatenated into one record Is there an option to do this through sqlldr?


Looks like fixed length data to me and SQL*Loader has had not problem
with that for well more than a decade so why are you asking the question?

1. This is school work and you didn't pay attention in class?
2. You don't know how to use the web to look up SQL*Loader syntax?
3. All of the above?

The syntax is well documented at http://tahiti.oracle.com and at
http://www.psoug.org
click on Morgan's Library
click on SQL*Loader

And my apologies to anyone trying to use the library for the last 2
days. I ran out of paid quota on the server and was out-of-town. All
should be fixed now.

Who would have ever thought I'd hit 5GB of downloads in just 10 days?
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Reply With Quote
SQLLoader - Contenate and continueif
  #3
Old 02-11-2005, 11:33 AM
Guest
Guest


Guest's Info
Posts: n/a
Default SQLLoader - Contenate and continueif

Did you read my question fully? I would not have asked this question
for simple fixed length delimiter. Please read the question and
UNDERSTAND if there is a catch in the question before blasting off.

I have to concatentate variable number of records of second field into
one field

Reply With Quote
SQLLoader - Contenate and continueif
  #4
Old 02-11-2005, 03:43 PM
Daniel Morgan
Junior Member


Daniel Morgan is offline
Daniel Morgan's Info
Join Date: Aug 2004
Posts: 0
Default SQLLoader - Contenate and continueif

rajesh.garigipati@gmail.com wrote:
Quote:
Did you read my question fully? I would not have asked this question for simple fixed length delimiter. Please read the question and UNDERSTAND if there is a catch in the question before blasting off. I have to concatentate variable number of records of second field into one field


Can't be done the way you are trying to do it.

Blow it into a staging table and disburse from there.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Reply With Quote
SQLLoader - Contenate and continueif
  #5
Old 02-15-2005, 11:18 AM
GQ
Junior Member


GQ is offline
GQ's Info
Join Date: Dec 2004
Posts: 3
Default SQLLoader - Contenate and continueif

Do you have a control character in every line of input text? (or is
that the problem)
Did you try to use the CONTINUEIF option to build logical records from
multiple physical record ?
Which Oracle version are you using (the newer version have more
capabilities) ?

This is basic SQLLoader stuff, so I am missing something ?

Reply With Quote
SQLLoader - Contenate and continueif
  #6
Old 02-16-2005, 06:54 PM
Guest
Guest


Guest's Info
Posts: n/a
Default SQLLoader - Contenate and continueif

I am using 8.1.7. I checked some examples of continueif and found that
multiple physical records are for different fields in the same logical
record. What I need to concatenate 2 physical records into the same
field. Do you know how to do that?

Reply With Quote
SQLLoader - Contenate and continueif
  #7
Old 02-28-2005, 12:11 PM
MrB
Junior Member


MrB is offline
MrB's Info
Join Date: Feb 2005
Posts: 1
Default SQLLoader - Contenate and continueif

rajesh.garigipati@gmail.com wrote in news:1108608886.684671.282580
@z14g2000cwz.googlegroups.com:
Quote:
I am using 8.1.7. I checked some examples of continueif and found that multiple physical records are for different fields in the same logical record. What I need to concatenate 2 physical records into the same field. Do you know how to do that?


The table definition that is the target for the load and any TERMINATED
BY clauses etc will define how the logical record is mapped on to the
individual fields.

You can nearly do what you want, but there is a problem with the leading
spaces at the start of each coninuation record.

The following sample control file will load the following data

LOAD DATA
INFILE *
DISCARDFILE loadtest.dsc
TRUNCATE
CONTINUEIF NEXT PRESERVE (1:2) = ' '
INTO TABLE loadtest
( cd CHAR(2),
text CHAR(1000)
)
BEGINDATA
A1 ZAAAAAAAAAAAAAAAAAAAAAAAAAZ
B2 XBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBX
C3 WCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCW
D4 DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
E5 EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
F6 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFF
G7 GGGGGGGGGGGGGGGGGGGGGGGGGGG

**BUT**
The 'NEXT PRESERVE (1:2)' clause keeps the first 2 chars of
the logical record so that A1, B2 etc are kept to populate
the 'cd' column of the table. But this has the effect of keeping the
(first two) spaces from the start of the continuation records that are
included when the physical records are appended together. Result, gaps in
the 'text' field that might give you a problem.

SQL> select * from loadtest;

CD
--
TEXT
-------------------------------------------------------------------------
-------

AA
ZAAAAAAAAAAAAAAAAAAAAAAAAAZ

BB
XBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBX

CC
WCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCW
Reply With Quote
gay sex
  #8
Old 01-27-2007, 02:55 AM
gayssexy
Junior Member


gayssexy is offline
gayssexy's Info
Join Date: Jan 2007
Posts: 1
Post gay sex

gay sex stories gay teen sex hot gay sex free gay sex his first gay sex gay anal sex gay sex movies gay male sex gay oral sex gay college sex gay sex brother gay sex gay men having sex young gay sex gay sex may be guy gay gay sex discovered gay sex — cached sex article sex cached gay sex city content killer similar ed years move 4588998 rocks gay gay gay used to evangelical gay rules the ins ins books dp 128k pics s the gay revised if guilty pages sex cached stop 45k 6165 gay gay in pages anti sex with outs gay 71k cached similar buying some more shocking act surprised men gay sex sex match the during gay sex the similar gay is videos gay sex movement a sex gay cached we of sex gay pics pages 09 similar gay gay sex sex similar cloland pages similar gay sex similar similar pages gay pages cloland pages jack young pages gay sex of get selections from a sex gay outpersonals sex scandal straight sex gay · stage6 employees pivotal state series emails gay sex gay redefining the sex gay gay “manifestly us edmund sex gay appeal new gay sex york risks and they have new chosen lesbian pics doing drugs assfuck semi to course sex start gay gay sex sex ass wednesday locker sex of order gay sex of room 70s sexy gay gay sex free gay sex gay college sex gay sex gay anal sex hot gay sex his first gay sex gay teen sex gay sex movies gay men having sex gay sex stories young gay sex gay male sex brother gay sex gay oral sex gay sex
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Style Design by vBStyles.com


Top Contact Us - IT Forums - Archive - MyLounge Top
MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service