Skip to Content
0
Former Member
Jul 28, 2005 at 02:28 PM

Problems with Left Outer Join

401 Views

Hi guys,

i have a big problem with left outer join and the where condition:

3 tables

table1: IDCUST NAME TEL

table2: IDCUST CURRENCY

table3: ID3 IDCUST PRODUCTNAME

So one Customer can have more than one Product (1 - n)

So my select looks like this:

Select

a~name

a~tel

b~currency

c~productname

from

table1 As a

inner join table2 as b

on aidcust = bidcust

left outer join table3 as c !!!!!

on aidcust = cidcust

Where (condition-string).

Now the Error:

my condition-string is dynamic.

so if i want to have productname="prod1" an all customers with this product i get an error.

but if i want to have all customers where tel number = "123"

i get a result with all customers tel=123 AND their products! (that's correct).

So how can i get a result with using a where condition including table 3 without having an error????

Please help me!!!