客户名单!有出生日期,格式如1980-07-19,1985-07-19.建一生日查询,如查询07-19日出生的人!列出所有!这个查询该怎么写!

解决方案 »

  1.   

    select * from table where right(date,5)='07-19'
      

  2.   

    如果是sql server,可以这么做,先用convert转换为字符串,然后使用substring截取子串
    select rq from slinfo
    where substring(convert(varchar(10),rq,110),1,5)='01-01'
      

  3.   

    Adotable1.Filtered:=False;
        Adotable1.Filter:='right(出生日期,5)='''+Trim(Edit3.Text)+'''';
        Adotable1.Filtered:=True;
    我这么查怎么出错呢?大家帮忙看一下!
      

  4.   

    select * from table1 where Format(Birthday, 'mm-dd') = '07-19'
      

  5.   

    sql数据库
    select * from 人事表 where month(birthday)='07' and day(birthday)='19'