Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SQL outer join better or within in QV?

Can someone help me to do an Outer join with this below script? I was trying to do it in QV but I get an Memory Timed Out error, so thought would do it before even loading as seen below. Can someone suggest a solution for this please? I have a Error regarding the below SQL script, which I am not able to crack.

Consecutive_Amounts:

LOAD

Amount,

    LoanKey,

    YearMonth;

SQL SELECT Amount,

    LoanKey,

    YearMonth

FROM "AOF_DataMart".Reporting.vLastFctPayment

Where PortfolioKey = $(vPortfoliokey)

(SELECT LoanKey,

    YearMonth

FROM "AOF_DataMart".Reporting.LoanByYearMonth) Outer Join  LoanKey on LoanKey

Order By YearMonth;

Thanks,

Mady

Labels (1)
1 Reply
sbaldwin
Partner - Creator III
Partner - Creator III

Hi, have you tried changing your SQL to be something like this:

Consecutive_Amounts:

LOAD

    Amount,

    LoanKey,

    YearMonth;

SQL SELECT

    lp.Amount,

    lp.LoanKey,

    lbm.YearMonth

FROM "AOF_DataMart".Reporting.vLastFctPayment lp

left outer join "AOF_DataMart".Reporting.LoanByYearMonth lbm on lp.LoanKey  = lbm.lp.LoanKey

Where PortfolioKey = $(vPortfoliokey)

Thanks

Steve