Rank: Member
Groups: Registered
Joined: 10/29/2014(UTC) Posts: 12 Location: Schio
|
Hi all, I got a righ join and I don't know how to avoid WHERE clause If I run the following select, then the result is empty SELECT FASE4.IdFa4 AS C0, FASE4.BioTransp AS C1, FASE3.IdF4 AS C2, FASE3.BioTransp AS C3, FASE3.DataLogger AS C4 FROM (FASE4 RIGHT OUTER JOIN FASE3 ON FASE4.IdFa4 = FASE3.IdF4) WHERE 1=0 ORDER BY FASE4.IdFa4 ASC,FASE4.BioTransp ASC,FASE3.IdF4 ASC,FASE3.BioTransp ASC,FASE3.DataLogger ASC If I use the same instead from database side without (deleting) WHERE 1=0 It works as expected. I don't understand becouse I'm not able to avoid the empty result or removing the WHERE 1=0 clause. From wich poit it comes out ? Edited by user Monday, November 24, 2014 1:46:55 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Yes, good question indeed,
the 1=0 is used to Check SQL only in order to made a quick check, not to perform the actual query when you execute the report... I wonder if I should hide to avoid misunderstanding like you had.
Note that the query used may depends on the restrictions selected (if you have prompted restrictions), however you can have a look at the SQL generated without the 1=0, just click on the Model property "SQL Statement" "<Expand to view SQL>"
|
|
|
|
Rank: Member
Groups: Registered
Joined: 10/29/2014(UTC) Posts: 12 Location: Schio
|
Hi, on the Model property "SQL Statement" "<Expand to view SQL>" the Select is correct without Where 1 = 0
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.