sql 查询
我有一个月和日组成的数字,有两组月和日 想在身份证号中挑选出在该该两组月日之间出生的人,不知道应该怎么写. 身份证号有可能是15位或者18位 月日组合的形式如下 10-17/04-20 月-日/月-日 求教各位大侠
來點數據吧~~ 用先判斷位數再用substring取 15轉換18參照 select * from view_MemberInfo where ( case when len(f_CardID) = 15 then substring(f_CardID,9,4) else substring(f_CardID,11,4) end) between '1017' and '0420' 这样写对么引用 用先判斷位數再用substring取 15轉換18參照 支持 {{
相关问答:
小弟是个新手 现在有个问题一直不能解决 例如 procedure produce_proc @p001 nvarchar(8000), @p002 nvarchar(8000), @p003 nvarchar(8000), & ......
with adod_dict do begin close; commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
SELECT Count(*) from In_fo WHERE Reader_Time between #" + time1 + "# AND #" + time2 + "# and id=" + userid + "; 上面是我写的sql语句 Reader_Time是时间类型 id为数字 ......
PB中开发的。 DateTime startTime=DateTime(em_1.Text) DateTime endTime=DateTime(em_2.Text) string sql sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+&q ......
表结构如下 ID parentid Name 1 0 大客车 2 1 金龙 请问如何用一段sql文查询出如下结果 ID  ......