what is use of self join and which cases you will use this join
Answer / vidhya
A physical file can be joined to itself to read records that are formed by combining two or more records from the PF itself.
For example
You use a self join when a table references data in itself.
E.g., an Employee table may have a SupervisorID column that points to the employee that is the boss of the current employee.
To query the data and get information for both people in one row, you could self join like this:
select e1.EmployeeID,
e1.FirstName,
e1.LastName,
e1.SupervisorID,
e2.FirstName as SupervisorFirstName,
e2.LastName as SupervisorLastName
from Employee e1
left outer join Employee e2 on e1.SupervisorID = e2.EmployeeID
| Is This Answer Correct ? | 0 Yes | 0 No |
There are six records in a file and we are going to update that records and used commit operation when it complete the update but suppose when it updating the third record,a error occured and operation failed.Is previously two records will be update or whole operation will be rollback? Please confirm it.
How to insert more than one record to a pf at a time?(Bulk insert to a pf)
How to read a PF in reverse(from last rec to first) using CL?
how can i know logical file belongs to which physical file without source?
how to restrict upon adding the data for field reference file in DB400
How to add a field to a PF and compile it without loss of data?
how to add a new field to a file without compiling it?
Can we concatenate fields in physical file? If yes how can we do?
What is the interactive job? What is the batch job? How to change the batch job to interactive job?
how to know total no of records in pf with out using sql??????
How many maximum record format a logical file have?
When u create a PF and did not fill up Maint parameter, then by default which access path will the system take & why