Forum Post: Dynamic query with self join

  • Thread starter Thread starter jasdeep
  • Start date Start date
Status
Not open for further replies.
J

jasdeep

Guest
I have very challenging situation with self join and dynamic query. Here is the scenario : In a smart window the records are displayed in a browser based on the selection of date. The data to be displayed is retreived from two tables: 1. Table_A with self join on it. 2. Table_B with SourceID.Table_A = SourceID.Table_B Retrieve Sourcename from Table_B for the SourceID Here is the query : Define buffer x2 for Table_A. FOR EACH Table_A NO-LOCK, EACH x2 WHERE x2.SOURCE_Id = Table_A.SOURCE_Id AND DATE(Table_A.DATE_Time_Updated) = DATE ("03/26/2009") and (x2.QSA_Approved = YES OR x2.QSA_Approved = NO), EACH Table_B WHERE Table_B.Source_Id = Table_A.SOURCE_Id BY Table_B.SOURCE BY x2.DATE_Time_Updated DESC: I have following questions : 1. How many SDO's do I need to create? 2. How the self join can be represented in SDO? 3. How the Dynamic query can be formed? I tried different options with buffers but nothing worked. I am not able to figure out how to do DYnamic query. I will highly appretiate your great help. I am badly stuck with it. Thanks

Continue reading...
 
Status
Not open for further replies.
Back
Top