|
|
| Charles Bonsu 2005-04-20, 8:24 pm |
| If I have an outer join of say
where tableA.pk *= tableB.pk
AND tableB.type_code = 'ABB'
AND tableB.atr_code NOT IN ('B','F','G')
is that bad logic or it can be done
| |
| Mark A. Parsons 2005-04-20, 8:24 pm |
| Do you get an error message when you submit the query?
Charles, Bonsu wrote:
> If I have an outer join of say
> where tableA.pk *= tableB.pk
> AND tableB.type_code = 'ABB'
> AND tableB.atr_code NOT IN ('B','F','G')
>
> is that bad logic or it can be done
| |
|
| TableB can not participate in any equal join.
regards
Manoj
<Charles Bonsu> wrote in message news:4266b981.410e.1681692777@sybase.com...
> If I have an outer join of say
> where tableA.pk *= tableB.pk
> AND tableB.type_code = 'ABB'
> AND tableB.atr_code NOT IN ('B','F','G')
>
> is that bad logic or it can be done
| |
| Luc Van der Veurst 2005-04-21, 7:24 am |
| Then use the standard outer join syntax :
select ...
from tabelA left join tableB
on tableA.pk = tableB.pk
AND tableB.type_code = 'ABB'
AND tableB.atr_code NOT IN ('B','F','G')
Luc.
"manoj" <manoj_kumar@non.agilent.com> wrote in message
news:42676004$1@foru
ms-2-dub...
> TableB can not participate in any equal join.
> regards
> Manoj
>
> <Charles Bonsu> wrote in message
news:4266b981.410e.1681692777@sybase.com...
>
>
| |
| Charles Bonsu 2005-04-21, 9:24 am |
| What would you suggest to still get the same result.
> TableB can not participate in any equal join.
> regards
> Manoj
>
> <Charles Bonsu> wrote in message
>
>
| |
|
| You can split the query in 2 step.
regards
Manoj
<Charles Bonsu> wrote in message news:4267b050.13c.1681692777@sybase.com...[color=darkred]
> What would you suggest to still get the same result.
>
>
| |
|
| > If I have an outer join of say
> where tableA.pk *= tableB.pk
> AND tableB.type_code = 'ABB'
> AND tableB.atr_code NOT IN ('B','F','G')
>
> is that bad logic or it can be done
Use view for tableB.atr_code NOT IN ('B','F','G')
And outher join with view
Dariusz Turek
|
|
|
|