cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello,

I have a parameter that I'm passing to a sub report. I would like to use the parameter on the LEFT OUTER JOIN line instead of the WHERE area.

Example:

Reference "B"

SELECT * FROM A

LEFT OUTER JOIN B

ON (A.Id = B.Id)

LEFT OUTER JOIN C

ON (A.Id = C.Id)

LEFT OUTER JOIN D

ON (A.Id = D.Id)

WHERE parm = 0 AND

r = 12345 AND

s = 'abc' AND

t = 'nn'

Instead do this

SELECT * FROM A

LEFT OUTER JOIN (Select * FROM B WHERE Name = parm) B

ON (A.Id = B.Id)

LEFT OUTER JOIN C

ON (A.Id = C.Id)

LEFT OUTER JOIN D

ON (A.Id = D.Id)

WHERE

r = 12345 AND

s = 'abc' AND

t = 'nn'

0 Likes
View Entire Topic
former_member731159
Participant

Ok, disregard the last comment. I see what you are doing now. The isNull is allowing null values to pass through, which means that we get data when there is no match. I testing it now.