SQL查询语法 [英] SQL Query Syntax

查看:85
本文介绍了SQL查询语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在尝试修改SQL查询,但我正在努力学习语法。

I am trying to modify a SQL query, but am struggling with the syntax.

我有一对单选按钮,指示接收的文件是否为图形或模型格式。

I have a pair of radio buttons indicating whether files received are in drawing or model format.

所有现有记录都定义为图纸,但在单选按钮字段中没有条目。

All existing records are defined as drawings, but will not have an entry in the radio button field.

所以我尝试了这个条目:

So I tried this entry:

如果Me.FrameDwgMod = 1那么strSql = strSql& " (tbVendorDwg。[dwg-mod] = 1或null)  AND"

If Me.FrameDwgMod = 1 Then strSql = strSql & " (tbVendorDwg.[dwg-mod]=1 or null)  AND"

但是1或null测试似乎没有返回没有单选按钮输入的所有现有条目。

But the 1 or null test doesn't seem to return all existing entries with no radio button entry.

任何人都知道我是什么在这里做错了吗?

Anyone know what I am doing wrong here?

谢谢

Phil

推荐答案

嗨Phil,

您是否尝试修改WHERE子句?要检查Null值,可以使用Is Null。例如:

Are you trying to modify a WHERE clause? To check for a Null value, you can use Is Null. For example:

... WHERE FieldName为空

...WHERE FieldName Is Null

希望有帮助......

Hope it helps...


这篇关于SQL查询语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆