Oracle Interview Questions
Questions Answers Views Company eMail

create one table to capture an employee details with a primary key.

CTS,

1 3747

write a query to count number of alphabets in given string for example "APPLE" write a query to generate sequence from 50 to 100 write a query to display in single string "ABCD,EFGH,IJKL,PQRS"

British Telecom BT,

7 9692

create or replace procedure show_tab_rec ( P_tab VARCHAR2 ) IS cmd varchar2(50); begin cmd := 'select * from '|| P_tab; for int in ( execute immediate cmd ) loop dbms_output.put_line ( int.ename||' '||int.deptno); end loop; end; when i m compling this procedure i m getting this error PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the following: . ( ) , * @ % & | = - + < / > at in is mod remainder not range rem => .. <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_ PLZ solve this error give this question answer asap Thanks advance.......

HCL,

1 4186

hello friends Im doing my final year engineering in B.Tech.. one of uncle said he can provide job in his company if im good in database management. but i have only basic knowledge about database, so like to join database management course in good intuition. so friends kindly help me to get good intuition because its my future.

1746

what is the difference between joins and set operators.i am always confusing with two,can u pls kindly help me .

HCL, LN,

5 17342

can u pls share responsibilities for production how to environment in odi?and how to generate report ?

1898

How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?

Zensar,

2720

Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

ESS,

2444

hi all, i have installed oracle xe software in windows 7. iam unable to connect sqldeveloper tool. can you please tell me how to connect. provide completed procedure.

1 2452

CREATE OR REPLACE procedure XXPROC_OPENINT(errbuf OUT VARCHAR2, retcode OUT VARCHAR2) AS --Cursor Declaration cursor inv_cur IS SELECT INVI.INVOICE_ID ,INVI.INVOICE_TYPE_LOOKUP_CODE ,INVI.INVOICE_DATE ,INVI.VENDOR_ID ,INVI.VENDOR_SITE_ID ,INVI.INVOICE_AMOUNT ,INVI.INVOICE_CURRENCY_CODE ,INVI.STATUS ,INVI.GROUP_ID ,INVI.SOURCE ,INVI.ORG_ID ,INVI.DESCRIPTION ,INVI.CREATION_DATE ,INVI.CREATED_BY ,INVL.INVOICE_ID ,INVL.LINE_NUMBER ,INVL.LINE_TYPE_LOOKUP_CODE ,INVL.DESCRIPTION ,INVL.ORG_ID ,INVL.INVENTORY_ITEM_ID ,INVL.ACCOUNTING_DATE ,INVL.AMOUNT ,INVL.CREATION_DATE ,INVL.CREATED_BY ,INVL.PO_HEADER_ID ,INVL.PO_LINE_LOCATION_ID ,INVL.ITEM_DESCRIPTION FROM XXAP_INVOICES_INTERFACE_STG INVI ,AP_INVOICE_LINES_INTERFACE_STG INVL WHERE INVI.INVOICE_ID=INVL.INVOICE_ID AND INVI.ORG_ID=INVL.ORG_ID; l_currency_code varchar2(25); l_flag varchar2(2); l_error_msg varchar2(100); l_err_msg varchar2(100); l_err_flag varchar2(10); l_count number(9) default 0; BEGIN for rec_cur in inv_cur loop l_count:=l_count+1; --Currency Code Validation BEGIN SELECT currency_code INTO l_currency_code FROM FND_CURRENCIES WHERE currency_code ='USD'; EXCEPTION WHEN others THEN l_flag:='E'; l_error_msg:='Currency Code Does not Exists'; fnd_file.put_line(fnd_file.log,'Inserting Data Into The Interface Table'||'-'||l_count||' '||l_error_msg); END; IF l_flag!='E' THEN fnd_file.put_line(fnd_file.log,'Inserting Data Into The Interface Table'); INSERT INTO AP_INVOICES_INTERFACE( INVOICE_ID ,INVOICE_TYPE_LOOKUP_CODE ,INVOICE_DATE ,VENDOR_ID ,VENDOR_SITE_ID ,INVOICE_AMOUNT ,INVOICE_CURRENCY_CODE ,STATUS ,GROUP_ID ,SOURCE ,ORG_ID ,DESCRIPTION ,CREATION_DATE ,CREATED_BY) VALUES (rec_cur.INVOICE_ID ,rec_cur.INVOICE_TYPE_LOOKUP_CODE ,rec_cur.INVOICE_DATE ,rec_cur.VENDOR_ID ,rec_cur.VENDOR_SITE_ID ,rec_cur.INVOICE_AMOUNT ,rec_cur.INVOICE_CURRENCY_CODE ,rec_cur.STATUS ,rec_cur.GROUP_ID ,rec_cur.SOURCE ,rec_cur.ORG_ID ,rec_cur.DESCRIPTION ,rec_cur.CREATION_DATE ,rec_cur.CREATED_BY); INSERT INTO ap_invoice_lines_interface ( INVOICE_ID ,LINE_NUMBER ,LINE_TYPE_LOOKUP_CODE ,DESCRIPTION ,ORG_ID ,INVENTORY_ITEM_ID ,ACCOUNTING_DATE ,AMOUNT ,CREATION_DATE ,CREATED_BY ,PO_HEADER_ID ,PO_LINE_LOCATION_ID,ITEM_DESCRIPTION) VALUES (rec_cur.INVOICE_ID ,rec_cur.LINE_NUMBER ,rec_cur.LINE_TYPE_LOOKUP_CODE ,rec_cur.DESCRIPTION ,rec_cur.ORG_ID ,rec_cur.INVENTORY_ITEM_ID ,rec_cur.ACCOUNTING_DATE ,rec_cur.AMOUNT ,rec_cur.CREATION_DATE ,rec_cur.CREATED_BY ,rec_cur.PO_HEADER_ID ,rec_cur.PO_LINE_LOCATION_ID ,rec_cur.ITEM_DESCRIPTION); END IF; l_flag:=NULL; l_err_MSG:=NULL; END LOOP; COMMIT; END XXPROC_OPENINT; / PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names

2481

A scenario for amount correction & how to use amount correction functionality in AP invoices

1642

I have a table like this Table Name:Products Productid Price 1 10 1 10 2 20 3 30 3 30 But i want to output like this. productid price 2 20. please replay me.

TCS,

3 4707

What are joins, explain all types of joins?

Bravura Solutions,

1711

Do you know about aggregate functions? What is row num function? Can it be used all databases?

Bravura Solutions, Cap Gemini,

1 3511

Write query to fetch second maximum salary from employee table.

Bravura Solutions, HCL,

4 5995


Un-Answered Questions { Oracle }

What is literal?

580


What are set operators?

642


What are the benefits of oracle rac?

1


How to retrieve the count of updated rows?

568


How to get a list of all user accounts in the database?

601






What is oracle partial backup?

304


How is it different from a normal table?

575


What is the data pump import utility?

573


What is oracle log switch?

290


If the valueset if of type –TABLE then how many tables can we attach in the valueset ?

1807


How to define an explicit cursor in oracle?

593


What is the sql query to find the employee who has Nth maximum salary?

4270


What is ora-1555 snapshot too old error? Explain in detail?

355


Assuming that you are an End User How to find that in the payment Batch some of the Invoice was  Missing To pay How to find That??

1263


What is a subquery?

606