View Full Version : Q: SQL*Loader
Hi,
Is it possible to retreive from within sqlldr script the timestamp of
the file imported, to be written in a table field?
Example, my script looks like this:
UNRECOVERABLE
LOAD DATA
INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt'
INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER
( sifra POSITION(2:15),
program POSITION(83:83),
price POSITION(27:37)
)
I want to add the ss45.txt file's timestamp to the table, that's the
idea.
I spent hours searching on the Internet, cant beleive it is not
possible..
Thx a lot for yours answers,
Dinko
Bricklen
01-14-2004, 09:09 AM
Miki wrote:
Hi, Is it possible to retreive from within sqlldr script the timestamp of the file imported, to be written in a table field? Example, my script looks like this: UNRECOVERABLE LOAD DATA INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt' INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER ( sifra POSITION(2:15), program POSITION(83:83), price POSITION(27:37) ) I want to add the ss45.txt file's timestamp to the table, that's the idea. I spent hours searching on the Internet, cant beleive it is not possible.. Thx a lot for yours answers, Dinko
try:
UNRECOVERABLE
LOAD DATA
INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt'
INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER
( sifra POSITION(2:15),
program POSITION(83:83),
price POSITION(27:37),
tstamp_col "to_date(sysdate,'mm/dd/yyyy hh24:mi:ss')",
)
I think that the tstamp_col above may help, although it's been a while
since I used sqlldr so you'll have to test this.
Bricklen <bricklen-rem@yahoo.comz> wrote in message news:<tJeNb.14647$n44.5204@clgrps13>... Miki wrote: Hi, Is it possible to retreive from within sqlldr script the timestamp of the file imported, to be written in a table field? Example, my script looks like this: UNRECOVERABLE LOAD DATA INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt' INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER ( sifra POSITION(2:15), program POSITION(83:83), price POSITION(27:37) ) I want to add the ss45.txt file's timestamp to the table, that's the idea. I spent hours searching on the Internet, cant beleive it is not possible.. Thx a lot for yours answers, Dinko try: UNRECOVERABLE LOAD DATA INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt' INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER ( sifra POSITION(2:15), program POSITION(83:83), price POSITION(27:37), tstamp_col "to_date(sysdate,'mm/dd/yyyy hh24:mi:ss')", ) I think that the tstamp_col above may help, although it's been a while since I used sqlldr so you'll have to test this.
no no, I don't need the present date/time, I need importing file's creation date...
thx anyway
Bricklen
01-15-2004, 07:25 AM
Miki wrote: no no, I don't need the present date/time, I need importing file's creation date...
This timestamp then comes from where? Is your question really "how do I
get the file's creation timestamp"?
Daniel Morgan
01-15-2004, 07:59 AM
Miki wrote:
Bricklen <bricklen-rem@yahoo.comz> wrote in message news:<tJeNb.14647$n44.5204@clgrps13>...Miki wrote:Hi,Is it possible to retreive from within sqlldr script the timestamp ofthe file imported, to be written in a table field?Example, my script looks like this:UNRECOVERABLELOAD DATA INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt' INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER ( sifra POSITION(2:15), program POSITION(83:83), price POSITION(27:37) )I want to add the ss45.txt file's timestamp to the table, that's theidea.I spent hours searching on the Internet, cant beleive it is notpossible..Thx a lot for yours answers,Dinkotry:UNRECOVERABLELOAD DATA INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt' INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER ( sifra POSITION(2:15), program POSITION(83:83), price POSITION(27:37), tstamp_col "to_date(sysdate,'mm/dd/yyyy hh24:mi:ss')", )I think that the tstamp_col above may help, although it's been a whilesince I used sqlldr so you'll have to test this. no no, I don't need the present date/time, I need importing file's creation date... thx anyway
If you want to date-time the file was created in the operating system
you will not get that with SQL*Loader. Either hard code it or start
writing your own C or Java to perform the task.
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)
Daniel Morgan <damorgan@x.washington.edu> wrote in message news:<1074182291.891999@yasure>... Miki wrote: Bricklen <bricklen-rem@yahoo.comz> wrote in message news:<tJeNb.14647$n44.5204@clgrps13>...Miki wrote:>Hi,>>Is it possible to retreive from within sqlldr script the timestamp of>the file imported, to be written in a table field?>>Example, my script looks like this:>UNRECOVERABLE>LOAD DATA> INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt'> INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER> ( sifra POSITION(2:15),> program POSITION(83:83),> price POSITION(27:37)> )>>I want to add the ss45.txt file's timestamp to the table, that's the>idea.>>I spent hours searching on the Internet, cant beleive it is not>possible..>>Thx a lot for yours answers,>Dinkotry:UNRECOVERABLELOAD DATA INFILE '\\Acz_Fin1\Vol3\vwdat\rdvk\SS45.txt' INTO TABLE MAT_ORIGINALNI_DIJELOVI_LOADER ( sifra POSITION(2:15), program POSITION(83:83), price POSITION(27:37), tstamp_col "to_date(sysdate,'mm/dd/yyyy hh24:mi:ss')", )I think that the tstamp_col above may help, although it's been a whilesince I used sqlldr so you'll have to test this. no no, I don't need the present date/time, I need importing file's creation date... thx anyway If you want to date-time the file was created in the operating system you will not get that with SQL*Loader. Either hard code it or start writing your own C or Java to perform the task.
It can't be done with SQL*Loader, that was the fine answer.
thx a lot
Dinko
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
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.