select * from tablename where date=日期
select * from tablename where seller=销售员

解决方案 »

  1.   

    1\select 销售员业绩 from tablename where 销售员 = 想要查询的人名 and datediff(d, 日期, 想要查询的日期) = 0
    2\select 销售员业绩 from tablename where 销售员 = 想要查询的人名
      

  2.   

    是这样的,
    查询条件是客户选择的,比如说有A,B,C,D四个字段,
    用户可能会选择只查询A,或只查询B,或C,D。
    也可能查A and B ,B and C,
    或其中任意2个,任意3个,任意4个。
    这样要判断的就很多了。逐一判断将是十分庞大的工作。
    怎么办?