1. SELECT A.PYCIS_INSTN_ID_N , A.AS400SHRTNM_C , A.INSTN_NM_C , B.INSTN_NM_C FROM INVESTMENT_DIM A, CLIENT_ACCOUNT_GRP_DIM B WHERE A.CLNT_GDW_ID_N = (SELECT CLNT_GDW_ID_N FROM CLIENT_ACCOUNT_GRP_DIM WHERE LOWER (CLNT_NM_C) LIKE '%SOMETHING%')
The tables INVESTMENT_DIM and CLIENT_ACCOUNT_GRP_DIM B do not have any of relationship
2. String query = " SELECT incd.errMemoIdC as memo_Id," + " ind.as400shrtnmC as short_Name," + " ind.instnNmC as account_Name," + " cagd.clntNmC as Client_name" + " FROM IncidentDim incd," + " IncidentAcctFact iaf," + " AccountDim ad," + " InvestmentDim ind," + " ClientAccountGrpDim cagd" + " WHERE cagd.clntGdwIdN = ind.clntGdwIdN" + " AND ind.gdwIdN = ad.gdwIdN" + " AND ad.acctDimIdN = iaf.acctDimIdN" + " AND iaf.incidentDimIdN = incd.incidentDimIdN"; " AND incd.errMemoIdC = :uiMemoId" + " AND ind.as400shrtnmC= :shrtName";
the above tables are again not realted.
I have been breaking my head over it for the past 3 days and tried many alternatives, but no gain :( Can anyone please help me out in replacing the above queries with valid HQL alternatives.
Thanks in advance.
|