on 06-22-2015 10:56 AM
Dear Experts,
We are creating an Relational Universe based on SQL queries given by the user, need to assign SQL query for an object in IDT- Data foundation layer
Below is the code...
E.EFFDT=(Select Max(E_ED.EFFDT) From Table
Where E.SETID = E_ED.SETID
AND E.ACCOUNT = E_ED_ACCOUNT
AND E_ED.EFFDT <=SYSDATE)
Can any one help me on this how to assign the above SQL query for an Object(EFFDT)
Regards
Ravi Shankar
Dear Ravi,
Create A derived table using below code
Select
E_ED.SETID,
E_ED.ACCOUNT,
Max(E_ED.EFFDT) As MaxDate
From E_ED
Where(E_ED.EFFDT <=SYSDATE)
Join this table with E table based on three column which are in derived table.
I hope this would be your requirement.
Thanks,
G Sampath Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sampath,
Or write up the sql in the Join expression between E and what ever other table that want to use E_ED fields.
I had a similar requirement where Material and Cost_area needed to use Client_ID, LANG_ID and Flag stuff from PROFILE table and I used similar sql in the join exp and it was worked.
Please clarify if your logic is correct only if we want to use the logic b/w E and E_ED tables but can use my logic if there was already a E_ED table and put a join b/w E and say EX tables.
Thanks, Kris
Hi Ravi,
Can you please provide the complete query as I can see
in your query you have used E_ED & E as two different alias .
Please Provide it so that solution can be provided easily.
Hi Ravi,
Can you please provide the complete query as I can see
in your query you have used E_ED & E as two different alias .
Please Provide it so that solution can be provided easily.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why aren't you building the universe based on the database design then using predefined conditions and other techniques for the more complex parts?
Instead of derived tables, I'd also consider using materialised views as they'd perform far better
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.