SQL*LOAD question / Help

SQL*LOAD question / Help

Post by Jennifer Farnh » Thu, 10 Jun 1993 07:34:00



This should be fairly easy for regular users of
SQL*LOAD.

Here is my .ctl file:

load data
infile newdata.dat
append
into table hp_drive_test
fields terminated by ","
 (ser_part_id, prod_tag, fru_ser_seq,
  fru_bld_dt DATE "DD_MON-YY",
  soft_err_tot, tot_def_worst_hd, max_inc_sk_avg,
  max_full_sk_avg, avg_sk, npes_nrro, npes_rro,
  spinup_time, run_current, row_add_dt ..... problem field)

I want to put the current system date "sysdate" into the
field called row_add_dt.  How do I tell sql*load this?

I know I can do this ----->   row_add_dt constant "08-JUN-93"

BUT, obviously, i don't want to have to do this everytime I load.


or post to this newsgroup.  Thanks!

 
 
 

SQL*LOAD question / Help

Post by Tony Dam » Sat, 12 Jun 1993 09:17:46



>This should be fairly easy for regular users of
>SQL*LOAD.

>Here is my .ctl file:

>load data
>infile newdata.dat
>append
>into table hp_drive_test
>fields terminated by ","
> (ser_part_id, prod_tag, fru_ser_seq,
>  fru_bld_dt DATE "DD_MON-YY",
>  soft_err_tot, tot_def_worst_hd, max_inc_sk_avg,
>  max_full_sk_avg, avg_sk, npes_nrro, npes_rro,
>  spinup_time, run_current, row_add_dt ..... problem field)

>I want to put the current system date "sysdate" into the
>field called row_add_dt.  How do I tell sql*load this?

>I know I can do this ----->   row_add_dt constant "08-JUN-93"

>BUT, obviously, i don't want to have to do this everytime I load.


>or post to this newsgroup.  Thanks!

According to the Utilities User's Guide Version 6.0 ...

...this feature is available as of Version 1.1 of SQL*Loader. A column defined
specified with SYSDATE gets the current system date, as defined by the SQL
Language SYSDATE function.

so,
...
spinup_time, run_current, row_add_dt SYSDATE)

should do it.

The database column must be of type CHAR or DATE. If the column is of
type CHAR, then date is loaded in the form "dd-mon-yy." After the load,
it can only be accessed in that form. If the system date is loaded into a
DATE column, then it can be accessed in a variety of forms that include
the time as well as the date.

Tony Damon

 
 
 

1. Does SQL*Load Load records in order of the data file ?

I'm running Oracle 7 on a OpenVMS Alpha 6.1 and using SQL*Load to load
some ASCII data.  I've noticed that SQL*Load does not always load the
table in the order of the records in the data file.  I used the VMS sort
utility to presort the data using 4 sort keys.

Is the SQL*Load "rows" or "array" parameter size causing this "out of
order" effect ?  I've truncated and reloaded the table and everything
worked fine the second time.  There seems to be no pattern to this effect.

TIA,
Cliff


2. Mac and PC to HP DW C?

3. SQL*LOAD question answered! Thanks!

4. Looking for WAN software distribution ideas.

5. SQL*Load file format question

6. iPaq screen crack

7. SQL*Loader Question - Loading Long Variable Length Records

8. Stupid question? DB transactions with CORBA

9. HELP! SQL*Load Error

10. SQL*Plus Help: Warning: Product user profile information not loaded!

11. help!! direct loading using sql loader

12. Help! SQL*load dies with Windows/Netware

13. ORA-01722 Invalid Number on SQL Load - Help!