Hi!
I have a question about query designer in excel.
I want SQL query to have in WHERE clause OR instead of AND (which is default), so the query would be like these:
<b>ORIGINAL:</b>
SELECT
D1~SID_ZKAZALNIK AS S____590
COUNT( * ) AS 1ROWCOUNT
SUM( F~/BIC/ZPLANKA2 ) AS ZPLANKA2
SUM( F~/BIC/ZVREDKA2 ) AS ZVREDKA2
FROM
FROM
/BIC/FZKAZAL AS F
JOIN
/BIC/DZKAZAL1 AS D1
ON
F~KEY_ZKAZAL1
= D1~DIMID
JOIN
/BIC/DZKAZALT AS DT
ON
F~KEY_ZKAZALT
= DT~DIMID
JOIN
/BIC/DZKAZALP AS DP
ON
F~KEY_ZKAZALP
= DP~DIMID
WHERE
<b>WHERE
( ( ( (
DT~SID_0CALQUARTER
= 20044
) ) AND ( (
DP~SID_0RECORDTP
= 0
) ) AND ( (
DP~SID_0REQUID
<= 1060
) ) ) )</b>*** GROUP BY
GROUP BY
D1~SID_ZKAZALNIK
DB-SPECIFIC HINTS
&SUBSTITUTE LITERALS&
<b>WHAT I WANT:</b>
SELECT
D1~SID_ZKAZALNIK AS S____590
COUNT( * ) AS 1ROWCOUNT
SUM( F~/BIC/ZPLANKA2 ) AS ZPLANKA2
SUM( F~/BIC/ZVREDKA2 ) AS ZVREDKA2
FROM
FROM
/BIC/FZKAZAL AS F
JOIN
/BIC/DZKAZAL1 AS D1
ON
F~KEY_ZKAZAL1
= D1~DIMID
JOIN
/BIC/DZKAZALT AS DT
ON
F~KEY_ZKAZALT
= DT~DIMID
JOIN
/BIC/DZKAZALP AS DP
ON
F~KEY_ZKAZALP
= DP~DIMID
WHERE
<b>WHERE
( ( ( (
DT~SID_0CALQUARTER
= 20044
) ) <b>OR</b> ( (
DP~SID_0RECORDTP
= 0
) ) <b>OR</b> ( (
DP~SID_0REQUID
<= 1060
) ) ) )</b>*** GROUP BY
GROUP BY
D1~SID_ZKAZALNIK
DB-SPECIFIC HINTS
&SUBSTITUTE LITERALS&<b></b><b></b>
Is there a way to change filter from AND to OR where u need that in visual query designer in Excel????
I need these becouse i want to say smth. like that ... SELECT data FROM some cube WHERE date = 10/2004 OR date_q = 3/2004 OR month = 11 OR year = 2003
Thanks for reply Roberto!
Do u think with that? :
Create 3 different queries on worksheet and than copy values in excel to another worksheet manualy?
If that, then this is not an option for me, becouse i need joust one query.
Is there another option?
Add a comment