Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
[Loss Mit Steps 324]:
LOAD [Loan Number] as ln_no_324,
[Ls Step Code] as step_cd_324,
Max([Ls Actual Completion Date]) as s324_Dt,
[Record Change Code]
FROM(qvd)
where match([Ls Step Code],'324')
and match([Record Change Code],'A','C')
group by [Loan Number]
I am attempting to show the maxdate and row for a table. The issue is the table tends to have duplicate or repeating fields. I keep getting Invalid expression however when I debug it does not pinpoint exactly where the invalid expression occurs.
you have to group by all fields where there isn't an aggregation function; added in bold
[Loss Mit Steps 324]:
LOAD
[Loan Number] as ln_no_324,
[Ls Step Code] as step_cd_324,
Max([Ls Actual Completion Date]) as s324_Dt,
[Record Change Code]
FROM (qvd)
where match([Ls Step Code],'324')
and match([Record Change Code],'A','C')
group by
[Loan Number],
[Ls Step Code],
[Record Change Code]
Hi,
Yes it will through you error for Group By clause.
Instead of using only [Loan Number]
you have to use all the fields excluding those fields on which you are using aggregate function .
Regards,