由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Urgent SQL problem!
相关主题
菜鸟问.asp 里的select语句在基于SQL sever和Access语法上的不再来一个SQL Server的面试题
吃了包子, 幹活了!问一个SQL Server的问题
急问一个关于T-SQL的问题,谢谢better solution for cross table query in sql?
如何完成这个sql?SQL combine two tables into one table and add a new column
问个SQL问题请教一个问题,急, 谢谢
难。想了一天了。大牛请进。Re: How to concatenate NULL value with a string in SQL Server?
请教:如何优化,提取组间最大行How to get other columns after UNION?
[转载] Can anyone interpret this simple SQL?新手问题求助
相关话题的讨论汇总
话题: inner话题: join话题: null话题: select话题: case
进入Database版参与讨论
1 (共1页)
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
10
这么简单的问题还有问的啊
l*********g
发帖数: 133
11
真是不明白你用了什么。肯定不是ISNULL

★ 发自iPhone App: ChineseWeb 1.0.1

【在 n***l 的大作中提到】
: thanks a lot. I used isnull and fixed it.
1 (共1页)
进入Database版参与讨论
相关主题
新手问题求助问个SQL问题
关于SQL Server的string function难。想了一天了。大牛请进。
not null in ms sql请教:如何优化,提取组间最大行
请教大虾问题哈,包子谢哈[转载] Can anyone interpret this simple SQL?
菜鸟问.asp 里的select语句在基于SQL sever和Access语法上的不再来一个SQL Server的面试题
吃了包子, 幹活了!问一个SQL Server的问题
急问一个关于T-SQL的问题,谢谢better solution for cross table query in sql?
如何完成这个sql?SQL combine two tables into one table and add a new column
相关话题的讨论汇总
话题: inner话题: join话题: null话题: select话题: case