Oracle Application 11i

All you need within Oracle Apps Ocean.

Tuesday, 26 April 2011

SQL Questions for OCA


1.Display the dept information from department table
2.Display the details of all employees
3.Display the name and job for all employees
4.Display name and salary for all employees
 5.Display employee number and total salary for each employee
6.Display employee name and annual salary for all employees
7.Display the names of all employees who are working in department number 10
8.Display the names of all employees working as clerks and drawing a salary more than 3000
9.Display employee number and names for employees who earn commission
10.Display names of employees who do not earn any commission
11.Display the names of employees who are working as clerk , salesman or analyst and drawing a salary more than 3000
12.Display the names of employees who are working in the company for the past 5 years
13.Display the list of employees who have joined the company before 30 th june 90 or after 31 st dec 90
14.Display current date
15. Display the list of users in your database (using log table)
16.Display the names of all tables from the current user
17.Display the name of the current user
18.Display the names of employees working in department number 10 or 20 or 40 or employees working as clerks, salesman or analyst
19.Display the names of employees whose name starts with alphabet S
20.Display employee name from employees whose name ends with alphabet S
21.Display the names of employees whose names have sencond alphabet A in their names
22.Display the names of employees whose name is exactly five characters in length
23.Display the names of employees who are not working as managers
24.Display the names of employees who are not working as SALESMAN or CLERK or ANALYST
25. Display all rows from emp table. The system should wait after every screen full of information
26.Display the total number of employees working in the company
27.Display the total salary and total commission to all employees
28.Display the maximum salary from emp table
29.Display the minimum salary from emp table
30.Display the average salary from emp table
31.Display the maximum salary being paid to CLERK
32.Display the maximum salary being paid in dept no 20
33.Display the minimum salary being paid to any SALESMAN
34.Display the average salary drawn by managers
35.Display the total salary drawn by analyst working in dept no 40
36.Display the names of employees in order of salary i.e. the name of the employee earning lowest salary shoud appear first
37.Display the names of employees in descending order of salary
38.Display the details from EMP table in order of EMP name
39. Display empno, ename, deptno and sal. Sort the output first based on name and within name by deptno and witdhin deptno by sal;
40) Display the name of employees along with their annual salary(sal*12).
the name of the employee earning highest annual salary should appear first?
41) Display name,salary,Hra,pf,da,TotalSalary for each employee.
The out put should be in the order of total salary ,hra 15% of salary ,DA 10% of salary .pf 5% salary Total Salary will be (salary+hra+da)-pf?
42) Display Department numbers and total number of employees working in each Department?
43) Display the various jobs and total number of employees working in each job group?
44)Display department numbers and Total Salary for each Department?
45)Display department numbers and Maximum Salary from each Department?
46)Display various jobs and Total Salary for each job?
47)Display each job along with min of salary being paid in each job group?
48) Display the department Number with more than three employees in each department?
49) Display various jobs along with total salary for each of the job where total salary is greater than 40000?
50) Display the various jobs along with total number of employees in each job.The
output should contain only those jobs with more than three employees?
51) Display the name of employees who earn Highest Salary?
52) Display the employee Number and name for employee working as clerk and earning highest salary among the clerks?
53) Display the names of salesman who earns a salary more than the Highest Salary of the clerk?
54) Display the names of clerks who earn a salary more than the lowest Salary of any salesman?
55) Display the names of employees who earn a salary more than that of jones or that of salary greater than that of scott?
56) Display the names of employees who earn Highest salary in their respective departments?
57) Display the names of employees who earn Highest salaries in their respective job Groups?
58) Display employee names who are working in Accounting department?
59) Display the employee names who are Working in Chicago?
60) Display the job groups having Total Salary greater than the maximum salary for Managers?
61) Display the names of employees from department number 10 with salary greater than that of ANY employee working in other departments?
62) Display the names of employees from department number 10 with salary greater than that of ALL employee working in other departments?
63) Display the names of mployees in Upper Case?
64) Display the names of employees in Lower Case?
65) Display the names of employees in Proper case?
66) Find the length of your name using Appropriate Function?
67) Display the length of all the employee names?
68) Display the name of employee Concatinate with Employee Number?
69) Use appropriate function and extract 3 characters starting from 2 characters from the following string 'Oracle' i.e., the out put should be ac?
70) Find the first occurance of character a from the following string Computer Maintenance Corporation?
71) Replace every occurance of alphabet A with B in the string .Alliens (Use Translate function)?
72) Display the information from the employee table . where ever job Manager is found it should be              displayed as Boss?
73) Display empno,ename,deptno from tvsemp table. Instead of display department numbers
      display the related department name(Use decode function)?
74) Display your Age in Days?
75) Display your Age in Months?
76) Display current date as 15th August Friday Nineteen Nienty Seven?
77) Display the following output for each row from tvsemp table?
78) Scott has joined the company on 13th August ninteen ninety?
79) Find the nearest Saturday after Current date?
80) Display the current time?
81) Display the date three months before the Current date?
82) Display the common jobs from department number 10 and 20?
83) Display the jobs found in department 10 and 20 Eliminate duplicate jobs?
84) Display the jobs which are unique to department 10?
85) Display the details of those employees who do not have any person working under him?
86) Display the details of those employees who are in sales department and grade is 3?
87) Display thoes who are not managers?
88) Display those employees whose name contains not less than 4 characters?
89) Display those department whose name start with"S" while location name ends with "K"?
90) Display those employees whose manager name is Jones?
91) Display those employees whose salary is more than 3000 after giving 20% increment?
92) Display all employees with their department names?
93) Display ename who are working in sales department?
94) Display employee name,dept name,salary,and commission for those sal in between 2000
       to 5000 while location is Chicago?
95) Display those employees whose salary is greater than his managers salary?
96) Display those employees who are working in the same dept where his manager is work?
97) Display those employees who are not working under any Manager?
98) Display the grade and employees name for the deptno 10 or 30 but grade is not 4 while
joined the company before 31-DEC-82?
99) Update the salary of each employee by 10% increment who are not eligible for commission?
100) Delete those employees who joined the company before 31-Dec-82 while their department Location is New York or Chicago?
101) Display employee name ,job,deptname,loc for all who are working as manager?
102) Display those employees whose manager name is jones and also display their manager
name?
103) Display name and salary of ford if his salary is equal to hisal of his grade?
104) Display employee name ,job,deptname,his manager name ,his grade and make an
under department wise?
105) List out all the employee names ,job,salary,grade and deptname for every one in a company except 'CLERK' . Sort on salary display the highest salary?
106) Display employee name,job abd his manager .Display also employees who are with out
managers?
107) Display Top 5 employee of a Company?
108) Display the names of those employees who are getting the highest salary?
109) Display those employees whose salary is equal to average of maximum and minimum?
110) Select count of employees in each department where count >3?
111) Display dname where atleast three are working and display only deptname?
112) Display name of those managers name whose salary is more than average salary of
Company?
113) Display those managers name whose salary is more than average salary salary of his
employees?
114) Display employee name,sal,comm and netpay for those employees whose netpay is
greater than or equal to any other employee salary of the company?
115) Display those employees whose salary is less than his manager but more than salary of
other managers?
116) Display all employees names with total sal of company with each employee name?
117) Find the last 5(least) employees of company?
118) Find out the number of employees whose salary is greater than their managers salary?
119) Display the manager who are not working under president but they are working under
any other manager?
120) Delete those department where no employee working?
121) Delete those records from emp table whose deptno not available in dept table?
122) Display those enames whose salary is out of grade available in salgrade table?
123) Display employee name,sal,comm and whose netpay is greater than any othere in the
company?
124) Display name of those employees who are going to retire 31-Dec-99 if maximum job period
is 30 years?
125) Display those employees whose salary is odd value?
126) Display those employees whose salary contains atleast 3 digits?
127) Display those employees who joined in the company in the month of Dec?
128) Display those employees whose name contains A?
129) Display those employees whose deptno is available in salary?
130) Display those employees whose first 2 characters from hiredate - last 2 characters sal?
131) Display those employeess whose 10% of salary is equal to the year joining?
132) Display those employees who are working in sales or research?
133) Display the grade of jones?
134) Display those employees who joined the company before 15th of the month?
135) Display those employees who has joined before 15th of the month?
136) Delete those records where no of employees in particular department is less than 3? 137A) Delete those employeewho joined the company 10 years back from today?
137B) Display the deptname the number of characters of which is equal to no of employee
in any other department?
138) Display the deptname where no employee is working?
139) Display those employees who are working as manager?
140) Count th number of employees who are working as managers (Using set opetrator)?
141) Display the name of the dept those employees who joined the company on the same date?
142) Display those employees whose grade is equal to any number of sal but not equal to first number of sal?
143) Count the no of employees working as manager using set operation?
144) Display the name of employees who joined the company on the same date?
145) Display the manager who is having maximum number of employees working under him?
146) List out the employee name and salary increased by 15% and express as whole number of Dollars?
147) Produce the output of the emptable "EMPLOYEE_AND JOB" for ename and job ?
148) List of employees with hiredate in the format of 'June 4 1988'?
149) print list of employees displaying 'Just salary' if more than 1500 if exactly 1500
display 'on taget' if less than 1500 display below 1500?
150) Which query to calculate the length of time any employee has been with the company
Ans: select hiredate,to_char(hiredate,' HH:MI:SS') FROM tvsemp
151) Given a string of the format 'nn/nn' . Verify that the first and last 2 characters are numbers .And that the middle character is '/' Print the expressions 'Yes' IF valid 'NO' of not valid . Use the following values to test your solution'12/54',01/1a,'99/98'?
152) Employes hire on OR Before 15th of any month are paid on the last friday of that month
those hired after 15th are paid the last friday of th following month .print a list of employees .their hiredate and first pay date sort those who se salary contains first digit of their deptno?
153) Display those managers who are getting less than his employees salary?
154) Print the details of employees who are subordinates to BLAKE?
151.Display those who working as manager using co related sub query
152.Display those employees whose manager name is JONES and also with his manager name
153.Define variable representing the expressions used to calculate on employees total annual renumaration define emp_ann_sal=(sal+nvl(comm,0))*.12;
154.Use the variable in a statement which finds all employees who can earn 30000 a year or more
155.Find out how many managers are there with out listing them
156.Find out the avg sal and avg total remuneration for each job type remember salesman earn commission
157.Check whether all employees number are indeed unique
158.List out the lowest paid employees working for each manager, exclude any groups where minsal is  less than 1000 sort the output by sal
159.List ename,job,annual sal,depno,dname and grade who earn 30000 per year and who are not clerks
160.Find out th job that was falled in the first half of 1983 and the same job that was falled during the
same period on 1984.
161.Find out the all employees who joined the company before their manager
162.List out the all employees by name and number along with their manager's name and number also display l'NO MANAGER' who has no manager
163.Find out the employees who earned the highest sal in each job typed sort in descending sal order
164.Find out the employees who earned the min sal for their job in ascending order
165.Find out the most recently hired employees in each dept order by hire date
166.Display ename, sal and deptno for each employee who earn a sal greater than the avg of their department order by deptno
167.Display the department where there are no employees
168.Display the dept no with highest annual remuneration bill as compensation
169.In which year did most people join the company. Display the year and number of employees
170.Display avg sal figure for the dept
171.Write a query of display against the row of the most recently hierd employee.display ename hire date and column max date showing
172.Display employees who earn more than lowest sal in dept no 30
173.Find employees who can earn more than every employees in dept no 30
174.select dept name and deptno and sum of sal break on deptno on dname;
175.Find out avg sal and avg total remainders for each job type
176.Find all dept's which have more than 3 employees
177.If the pay day is next Friday after 15th and 30th of every month. What is the next pay day from
their hire date for employee in emp table
178. If an employee is taken by you today in your organization and is a policy in your company to have a review after 9 months the joined date (and of 1st of next month after 9 months) how many days from today your employee has to wait for a review
179.Display employee name and his sal whose sal is greater than highest avg of deptno
180.Display the 10 th record of emp table (without using rowid)
181.Display the half of the enames in upper case and remaining lower case
182.Display the 10th record of emp table without using group by and rowid
183.Delete the 10th record of emp table
184.Create a copy of emp table
185.select ename if ename exists more than once
186.Display all enames in reverse order
187.Display those employee whose joining of month and grade is equal
188.Display those employee whose joining date is available in deptno
189.Display those employee name as follows A ALLEN, B BLAKE
190.List out the employees ename,sal,pf from emp
191.Display RSPS from emp without using updating,inserting
192.Create table emp with only one column empno
193.Add this column to emp table ename varchar2(20)
194.OOPSI i forget to give the primary key constraint. Add it now
195.Now increase the length of ename column to 30 characters
196.Add salary column to emp table
197.I want to give a validation saying that sal can not be greater 10000(note give a name to this column)
198.For the time being i have decided that i will not impose this validation. My boss has agreed to pay more than 10000
199.My boss has changed his mind. Now he doesn't want to pay more than 10000 So revoke that salary constraint
200.Add column called as mgr to your emp table
201.Oh! This column should be related to empno, Give a command tdo add this constraint
202.Add dept no column to your emp table
203.This deptno column should be related to deptno column of dept table
204.Create table called as new emp. Using single command create this table as well as to get data into this table (use create table as)
205.Create table called as newemp. This table should contain only empno,ename,dname
206.Delete the rows of employees who are working in the company for more than 2 years
207.Provides a commission to employees who are not earning any commission
208.If any employee has commission his commission should be incremented by 100% of his salary
209.Display employee name and department name for each employee
210.Display employee number, name and location of the department in which he is working
211.Display ename, dname even if there no employees working in a particular department(use outer join)
212.Display employee name and his manager name.
213.Display the department name along with total salary in each department
214.Display the department name and total number of employees in each department 

Customer Interface

All you need about Customer interface in Oracle apps 11i.
-------------------------------------------------------------------------------------------------------------

Interface Tables:    
1.       RA_CUSTOMERS_INTERFACE
2.      RA_CUSTOMER_PROFILES_INTERFACE
3.      RA_CONTACT_PHONES_INTERFACE
4.      RA_CUST_PAY_METHOD_INTERFACE
5.      RA_CUSTOMER_BANKS_INTERFACE

Customer (TCA) APIs:
1.      hz_party_v2pub. CREATE_PERSON
2.      hz_party_v2pub.UPDATE_PERSON
3.      hz_party_v2pub.CREATE_ORGANIZATION
4.      hz_party_v2pub.UPDATE_ORGANIZATION
5.      hz_customer_profile_v2pub.CREATE_CUSTOMER_PROFILE
6.      hz_customer_profile_v2pub.UPDATE_CUSTOMER_PROFILE
7.      hz_cust_account_v2pub.CREATE_CUST_ACCOUNT
8.      hz_cust_account_v2pub.CREATE_CUST_ACCT_RELATE
9.      hz_party_site_v2pub.CREATE_PARTY_SITE
10.   hz_party_site_v2pub.UPDATE_PARTY_SITE
11.   hz_cust_account_site_v2pub.CREATE_CUST_ACCT_SITE
12.   hz_party_contact_v2pub.CREATE_ORG_CONTACT


Base Tables:
1.      RA_CUSTOMERS (view)
a.      HZ_PARTIES
b.      HZ_CUST_ACCOUNTS

2.      RA_ADDRESSES (view)
a.      HZ_PARTY_SITES
b.      HZ_LOCATIONS
c.       HZ_CUST_ACCT_SITES_ALL

3.      RA_SITE_USES(view)
a.      HZ_CUST_SITE_USES_ALL

4.      RA_CUSTOMER_RELATIONSHIPS(view)
a.      RA_CUSTOMER_RELATIONSHIPS_ALL(view)
                                                                                                  i.      HZ_CUST_ACCT_RELATE_ALL

5.      AR_CUSTOMER_PROFILES(view)
a.      HZ_CUSTOMER_PROFILES

6.      AR_CUSTOMER_PROFILE_AMOUNTS(view)
a.      HZ_CUST_PROFILE_AMTS

7.      RA_CONTACTS(view)
a.      HZ_CUST_ACCOUNT_ROLES
b.      HZ_ORG_CONTACTS
c.       HZ_RELATIONSHIPS
d.      HZ_PARTIES

8.      RA_PHONES(view)
a.      HZ_CONTACT_POINTS

9.      RA_CUST_RECEIPT_METHODS


Oracle AIM Documents.

All Oracle AIM Documents are available.
Please mail me if you need any.



List of Documents on AIM Template :
Business Process Architecture (BP)
BP.010 Define Business and Process Strategy
BP.020 Catalog and Analyze Potential Changes
BP.030 Determine Data Gathering Requirements
BP.040 Develop Current Process Model
BP.050 Review Leading Practices
BP.060 Develop High-Level Process Vision
BP.070 Develop High-Level Process Design
BP.080 Develop Future Process Model
BP.090 Document Business Procedure
Business Requirements Definition (RD)
RD.010 Identify Current Financial and Operating Structure
RD.020 Conduct Current Business Baseline
RD.030 Establish Process and Mapping Summary
RD.040 Gather Business Volumes and Metrics
RD.050 Gather Business Requirements
RD.060 Determine Audit and Control Requirements
RD.070 Identify Business Availability Requirements
RD.080 Identify Reporting and Information Access Requirements
Business Requirements Mapping
BR.010 Analyze High-Level Gaps
BR.020 Prepare mapping environment
BR.030 Map Business requirements
BR.040 Map Business Data
BR.050 Conduct Integration Fit Analysis
BR.060 Create Information Model
BR.070 Create Reporting Fit Analysis
BR.080 Test Business Solutions
BR.090 Confirm Integrated Business Solutions
BR.100 Define Applications Setup
BR.110 Define security Profiles
Application and Technical Architecture (TA)
TA.010 Define Architecture Requirements and Strategy
TA.020 Identify Current Technical Architecture
TA.030 Develop Preliminary Conceptual Architecture
TA.040 Define Application Architecture
TA.050 Define System Availability Strategy
TA.060 Define Reporting and Information Access Strategy
TA.070 Revise Conceptual Architecture
TA.080 Define Application Security Architecture
TA.090 Define Application and Database Server Architecture
TA.100 Define and Propose Architecture Subsystems
TA.110 Define System Capacity Plan
TA.120 Define Platform and Network Architecture
TA.130 Define Application Deployment Plan
TA.140 Assess Performance Risks
TA.150 Define System Management Procedures
Module Design and Build (MD)
MD.010 Define Application Extension Strategy
MD.020 Define and estimate application extensions
MD.030 Define design standards
MD.040 Define Build Standards
MD.050 Create Application extensions functional design
MD.060 Design Database extensions
MD.070 Create Application extensions technical design
MD.080 Review functional and Technical designs
MD.090 Prepare Development environment
MD.100 Create Database extensions
MD.110 Create Application extension modules
MD.120 Create Installation routines
Data Conversion (CV)
CV.010 Define data conversion requirements and strategy
CV.020 Define Conversion standards
CV.030 Prepare conversion environment
CV.040 Perform conversion data mapping
CV.050 Define manual conversion procedures
CV.060 Design conversion programs
CV.070 Prepare conversion test plans
CV.080 Develop conversion programs
CV.090 Perform conversion unit tests
CV.100 Perform conversion business objects
CV.110 Perform conversion validation tests
CV.120 Install conversion programs
CV.130 Convert and verify data
Documentation (DO)
DO.010 Define documentation requirements and strategy
DO.020 Define Documentation standards and procedures
DO.030 Prepare glossary
DO.040 Prepare documentation environment
DO.050 Produce documentation prototypes and templates
DO.060 Publish user reference manual
DO.070 Publish user guide
DO.080 Publish technical reference manual
DO.090 Publish system management guide
Business System Testing (TE)
TE.010 Define testing requirements and strategy
TE.020 Develop unit test script
TE.030 Develop link test script
TE.040 Develop system test script
TE.050 Develop systems integration test script
TE.060 Prepare testing environments
TE.070 Perform unit test
TE.080 Perform link test
TE.090 perform installation test
TE.100 Prepare key users for testing
TE.110 Perform system test
TE.120 Perform systems integration test
TE.130 Perform Acceptance test
PERFORMACE TESTING(PT)
PT.010 - Define Performance Testing Strategy
PT.020 - Identify Performance Test Scenarios
PT.030 - Identify Performance Test Transaction
PT.040 - Create Performance Test Scripts
PT.050 - Design Performance Test Transaction Programs
PT.060 - Design Performance Test Data
PT.070 - Design Test Database Load Programs
PT.080 - Create Performance Test TransactionPrograms
PT.090 - Create Test Database Load Programs
PT.100 - Construct Performance Test Database
PT.110 - Prepare Performance Test Environment
PT.120 - Execute Performance Test
Adoption and Learning (AP)
AP.010 - Define Executive Project Strategy
AP.020 - Conduct Initial Project Team Orientation
AP.030 - Develop Project Team Learning Plan
AP.040 - Prepare Project Team Learning Environment
AP.050 - Conduct Project Team Learning Events
AP.060 - Develop Business Unit Managers’Readiness Plan
AP.070 - Develop Project Readiness Roadmap
AP.080 - Develop and Execute CommunicationCampaign
AP.090 - Develop Managers’ Readiness Plan
AP.100 - Identify Business Process Impact onOrganization
AP.110 - Align Human Performance SupportSystems
AP.120 - Align Information Technology Groups
AP.130 - Conduct User Learning Needs Analysis
AP.140 - Develop User Learning Plan
AP.150 - Develop User Learningware
AP.160 - Prepare User Learning Environment
AP.170 - Conduct User Learning Events
AP.180 - Conduct Effectiveness Assessment
Production Migration (PM)
PM.010 - Define Transition Strategy
PM.020 - Design Production Support Infrastructure
PM.030 - Develop Transition and Contingency Plan
PM.040 - Prepare Production Environment
PM.050 - Set Up Applications
PM.060 - Implement Production Support Infrastructure
PM.070 - Verify Production Readiness
PM.080 - Begin Production
PM.090 - Measure System Performance
PM.100 - Maintain System
PM.110 - Refine Production System
PM.120 - Decommission Former Systems
PM.130 - Propose Future Business Direction
PM.140 - Propose Future Technical Direction