标题:sql语句查询条件包含#问题
只看楼主
lyuyyw
Rank: 1
等 级:新手上路
帖 子:44
专家分:0
注 册:2007-3-19
 问题点数:0 回复次数:1 
sql语句查询条件包含#问题
我想比较时间用到的时间比较函数,大家都说要格式应该是 member_birth>=#1987-8-31#
我写的语句是 member_birth>="&nianlinga&" and member_birth<="&nianlingb&"
输出为:
select * from member where member_birth>=1987-8-31 and member_birth<=1977-8-31 and member_flag=1 order by member_reg asc
但是我想输出为:
select * from member where member_birth>=#1987-8-31# and member_birth<=#1977-8-31# and member_flag=1 order by member_reg asc
改怎么写sql语句那 我对where条后后面一堆逗号,引号看不懂,不知道该怎么弄!
搜索更多相关主题的帖子: sql 语句 条件 查询 
2007-08-31 14:56
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
得分:0 
member_birth>="&nianlinga&" and member_birth<="&nianlingb&"
改成
member_birth>='" & nianlinga & "' and member_birth<='" & nianlingb &"'
试试
2007-08-31 19:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-166793-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014231 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved