Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi im struggling with a sql load statement
i would like to load the following
SELECT * FROM KONTO
WHERE (KontoNr BETWEEN 5900 AND 5999)
AND KontoNr BETWEEN 3000 AND 3010;
How do i create this in the load script.
Second question is how to sum a specific range / interval in a expression like below
Sum ( {$ <Booked.Year = {'2016'},Booked.Month = {apr,maj,jun},Konto = {<='5900' and >='5999'}>}, Konto = {<='3000' and >='3010'} Amount)
Thx in advance
Or even this should work:
Sum({$<Booked.Year = {'2016'}, Booked.Month = {apr,maj,jun}, Konto = {'<=5900 >=5999', '<=3000>=3010'}>} Amount)
Hi,
I think you need OR here
SELECT * FROM KONTO
WHERE (KontoNr BETWEEN 5900 AND 5999)
OR KontoNr BETWEEN 3000 AND 3010;
REgards,
For 2nd query try like
Sum ( {$ <Booked.Year = {'2016'},Booked.Month = {apr,maj,jun},Konto = {<=5900 >=5999}>+<Booked.Year = {'2016'},Booked.Month = {apr,maj,jun},Konto = {<=3000>=3010} >} Amount)
Regards
Qlikview doesn't have the 'Between' function, so you can use the below:
Data:
Load
*
From <Your Table Name >
Where KontoNr>=5900 and KontoNr <=5999 OR KontoNr >=3000 And KontoNr <=3010;
Or even this should work:
Sum({$<Booked.Year = {'2016'}, Booked.Month = {apr,maj,jun}, Konto = {'<=5900 >=5999', '<=3000>=3010'}>} Amount)
Both Thirumala And Sunny T had correct answers.
Thx alot for fast respons.
Take care.