Hey guys,
I've got to implement a query performing the following task, I'm sure the query should be clear:
Code:
select Z.month, Z.value from Blah x
left join ZTable Z
on x.month = Z.month
but 'on' seems to be wrong. Why's that? Is there any way to perform this task using HQL?
Example: Table X contains months from 1 .. 13, in Z i've got month's and value's, and I want to get all months from Blah and null if there's no such value in Z .. hmm.. I hope it's clear :) Something like:
Code:
1 val1
2 val2
...
10 val5
11 null
12 null
Any ideas?
Thanks,
Kornel