d27m11y d27m11y
asked on
SQL loader
This was an interview question asked:
When I am trying to load only few columns in the table, I would mention those specific columns in control file to load the data. What if new column is added to the table. Would the sqlloader fail...
Could someone answer this
When I am trying to load only few columns in the table, I would mention those specific columns in control file to load the data. What if new column is added to the table. Would the sqlloader fail...
Could someone answer this
Slight has the answer -- though my guess is that it depends -- if the new column(s) were all NULL, then it might be okay. With non-null data, however, your control file would have to specify the change.
(
col1,
col2,
newcoln
)
begindata
1,2,someval
a,b,someval
(
col1,
col2,
newcoln
)
begindata
1,2,someval
a,b,someval
Excellent catch! I didn't think about possible constraints with the new column.
ASKER
When new column is added to the table, we are not using that in control file and not loading any data in the table for that specific column using sqlloader at that point of time. Would that control file still valid, I mean would sqlloader still run..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
set up the table:
Open in new window
Create a control file:
Open in new window
Then run sql loader:
Open in new window
Answer: It loads just fine...