I've 2 columns in my data file: A1, A2.
I want to insert the contents in a table wich h've as Primary Key: A1,A2 and B3.
I want in the control file to insert a default value for column B3.
How can i do?
Thank's
Printable View
I've 2 columns in my data file: A1, A2.
I want to insert the contents in a table wich h've as Primary Key: A1,A2 and B3.
I want in the control file to insert a default value for column B3.
How can i do?
Thank's
instead why dont you define a default for the column?
I can't add default value for this column, cause B3 is a year value. every year, we load data with the current year. So if we make default in table level.... it'll not work.
Is there no default value in the Load data clause?
Code:SQL> create table t (year number default to_char(sysdate,'yyyy'),
2 name varchar(2));
Table created.
SQL> insert into t (name) values ('Th');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t;
YEAR NA
---------- --
2004 Th
Why cant you set default.. you can do just byQuote:
Originally posted by bensmail
I can't add default value for this column, cause B3 is a year value. every year, we load data with the current year. So if we make default in table level.... it'll not work.
Trunc(Sysdate, 'YEAR')
Abhay.
Use SQL*Loader's control file parameter CONSTANT.Quote:
Originally posted by bensmail
I want in the control file to insert a default value for column B3.
How can i do?
http://download-west.oracle.com/docs...06.htm#1008262