如何在sqlserver中的一列中没有nullvalue? [英] How to take without nullvalues in one column in sqlserver?
本文介绍了如何在sqlserver中的一列中没有nullvalue?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的数据库中,bellow查询的第一列(DepRunningNo)有一些空值。我需要当我选择查询时没有那个空值如何写查询?
我尝试过:
选择 DepRunningNo,NetWeight 来自 dbo_OrdersCompleteView1 其中 convert ( varchar ( 25 ),S2_DateTimeOrederLines, 126 ) like ' %2016-05-14%';
谢谢&注册,
nagarjuna。
解决方案
add SQL:IS NOT NULL条件 [ ^ ]。
选择 DepRunningNo,NetWeight 来自 dbo_OrdersCompleteView1 其中 convert ( varchar ( 25 ),S2_DateTimeOrederLines, 126 ) like ' %2016-05-14%' 和 DepRunningNo 不 null
in my database the first column(DepRunningNo) of bellow query has some null values is there. i need when i'am select the query the without that null values how to write the query?
What I have tried:
select DepRunningNo,NetWeight from dbo_OrdersCompleteView1 where convert(varchar(25),S2_DateTimeOrederLines,126) like '%2016-05-14%';
thanks & regads,
nagarjuna.
解决方案
add SQL: IS NOT NULL Condition[^].
select DepRunningNo,NetWeight from dbo_OrdersCompleteView1 where convert(varchar(25),S2_DateTimeOrederLines,126) like '%2016-05-14%' and DepRunningNo is not null
这篇关于如何在sqlserver中的一列中没有nullvalue?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文