on 2011 Mar 01 9:31 AM
need to create object to calculate age of an employee when he employed using two columns i.e. date of employment and dob, both columns are in different table.
how to do that?
let me know if you need more info
thanks & regards
Hi,
I have one idea ..
Age = Date of employment - DOB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1.In Universe _First create the objects with DOE(Date of employeement), DOB(Date of Birth) as a Date object and right click on those objects and set the Object format as Date/Time YYYY. Click on Add for both objects. and Create one more object and select the Object as
Sum(@Select(Employee/DOE)-@Select(Employee/DOB))
2. In Web I_ same like above, 2 objects creation and apply the Fromat in Universe and Web I create a variable with some name as age and in that
=Sum(DOE-DOB)
Click ok.
Hope it will help you...
All the Best,
Madhu....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If after adding this sql object will not parse then follow the below steps:
1 Right click on the object at universe level and select object properties.
2. In the definition Tab click on tables button.
3.Hold the ctrl key and select both the tables.
4. Click on apply and ok.
5. Test the object.
Hope it helps.
thanks,
sands
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please follow the below steps:
Create a new object at universe level and pass your own sql with the help of below:
SELECT A.EMPNO, Round((A.HIREDATE-B.DOB)/365,2) AS EMPLOYED_DATE
FROM EMP A, EMPDOB B
WHERE A.EMPNO= B.EMPNONO
Above sql will give you the Employed age.
How I have Achieved this:
I have created a new table in the oracle as EMPDOB and taken two column as EMPNONO and DOB.
Inserted the desired records in the table and fired above query and got the correct output.
Hope it helps.
Thanks,
Sands
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
11 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.