SQL & in where 子句是什么意思?
SQL what does & in where clause mean?
这段代码正确吗:
"SELECT * FROM dataTable WHERE Datee Between '#" & textStartDate.Text & "# AND #" & textEndDate.Text & "#'"
那 & 是什么意思,# 谁能告诉我
我正在使用 vb 和 acess
符号“&”用于连接。
之前
"SELECT * FROM dataTable WHERE Datee Between '#" & textStartDate.Text & "# AND #" & textEndDate.Text & "#'"
之后
"SELECT * FROM dataTable WHERE Datee Between '#" & textStartDate.Text & "#' AND '#" & textEndDate.Text & "#'"
between 语句缺少用“'”引号括起日期值。
编辑
如何向非日期 sql 查询添加通配符。此代码在变量的两边都有通配符。
...WHERE SomeField like '*" & textWeAreSearchingFor & "*'"
以下是有关如何查询日期日期类型的其他示例。
...WHERE Datee >= '#" & textStartDate.Text & "#'"
或
...WHERE Datee < '#" & textStartDate.Text & "#'"
这段代码正确吗:
"SELECT * FROM dataTable WHERE Datee Between '#" & textStartDate.Text & "# AND #" & textEndDate.Text & "#'"
那 & 是什么意思,# 谁能告诉我 我正在使用 vb 和 acess
符号“&”用于连接。
之前
"SELECT * FROM dataTable WHERE Datee Between '#" & textStartDate.Text & "# AND #" & textEndDate.Text & "#'"
之后
"SELECT * FROM dataTable WHERE Datee Between '#" & textStartDate.Text & "#' AND '#" & textEndDate.Text & "#'"
between 语句缺少用“'”引号括起日期值。
编辑
如何向非日期 sql 查询添加通配符。此代码在变量的两边都有通配符。
...WHERE SomeField like '*" & textWeAreSearchingFor & "*'"
以下是有关如何查询日期日期类型的其他示例。
...WHERE Datee >= '#" & textStartDate.Text & "#'"
或
...WHERE Datee < '#" & textStartDate.Text & "#'"