n***l 发帖数: 27 | 1 SELECT a.col1, a.col2, a.col3 FROM A a
I'd like to case when a.col3 is not null then
INNER JOIN B b ON a.col3 = b.col3
case when a.col3 is null then
do not inner join B.
How to make it? Thanks million! |
r**********d 发帖数: 510 | 2 Add and a,col is not null
Can't do it?
also change inner join to left if you need rest of the table that dont match |
c****s 发帖数: 10 | 3 先用where clause将table分成两块。 inner join完再与另一部分union。 不知道是不
是正确理解了你的问题 |
n***l 发帖数: 27 | 4 thanks a lot. I used isnull and fixed it. |
n***l 发帖数: 27 | 5 SELECT a.col1, a.col2, a.col3 FROM A a
I'd like to case when a.col3 is not null then
INNER JOIN B b ON a.col3 = b.col3
case when a.col3 is null then
do not inner join B.
How to make it? Thanks million! |
r**********d 发帖数: 510 | 6 Add and a,col is not null
Can't do it?
also change inner join to left if you need rest of the table that dont match |
c****s 发帖数: 10 | 7 先用where clause将table分成两块。 inner join完再与另一部分union。 不知道是不
是正确理解了你的问题 |
n***l 发帖数: 27 | 8 thanks a lot. I used isnull and fixed it. |
a****k 发帖数: 117 | 9 SELECT a.col1, a.col2, a.col3 FROM A a INNER JOIN B b ON a.col3 = b.col3
WHERE a.col3 IS NOT NULL |
s**********o 发帖数: 14359 | |
l*********g 发帖数: 133 | 11 真是不明白你用了什么。肯定不是ISNULL
★ 发自iPhone App: ChineseWeb 1.0.1
【在 n***l 的大作中提到】![](/moin_static193/solenoid/img/up.png) : thanks a lot. I used isnull and fixed it.
|