Answer Posted / ravi satyadarshi
//1st of all create a directory to store ur external table
CREATE DIRECORY EMP_DIR AS '/FLAT_FILES' ;
// now write the following line of code to create an
external table at that directory
CREATE TABLE OLDEMP(ENO NUMBER,ENAME CHAR(20),DOB DATE,)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY EMP_DIR
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
BADFILE 'BAD_EMP')
LOGFILE 'LOG_EMP'
FIELDS TERMINATED BY ','
(ENO CHAR , ENAME CHAR DOB CHAR DATE_FORMAT
DATE MASK "DD-MON-YYYY"
)
)
LOCATION ('EMP1.TXT')
)
PARALLEL 5
REJECT LIMIT 200;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
I HAVE A PI ON COL A THE NEXT DAY I WANT CHANGE THE PI ON COL B? PLS SEND ME THE ANS
Explain about the storage and physical database design?
You have two tables with a one to many join based on a field named id. You need to find records in the parent table that are not represented in the child table. how would you accomplish this?
What is normalization? Explain different levels of normalization?
Can an extended stored procedure be called from inside a user-defined function?
How to use timestamp datatypes
If a column is an image value type, how you can compare column values? How can you use this column in join clause?
To convert IDMS to DB2, how to deal with IDMS occurs and redefined clause?
How can you log an error to the server event log from a stored procedure?
There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?
Write short notes on manual refreshes.
What are the three basic rules which are to be followed for the relational model of the database?
What is the maximum length of an extended property?
Which four data types cannot be used as a return type from a user-defined function?
What is data modeling with example?