cmd.CommandText="S ELECT "cregno" = a.cregno,"cguestname" = (Case left(a.cregno,1) when 'S' then '非住客' else (s elect cguestname from ft_his_xs_reg_1 where cregno = a.cregno) end),"cguesttype" = (Case left(a.cregno,1) when 'S' then '非住客' when 'T' then '团体' else (s elect cguesttype from ft_his_xs_reg_1 where cregno = a.cregno) end), & _
"cpaytype" = (Case isnull(cyjflag,'N') when 'Y' then '押金' else (case when a.npayamt >= 0 then '结帐收款' else '结帐退款' end ) end),"paywayno" = a.cpaywayno, "paywayname" = IsNull(c.cpaywayname,a.cpaywayno), "face" = a.nface, "ngetamt" = a.ngetamt, "change" = a.nchange, & _
"npayamt" = a.npayamt, "voucherno" = a.cvoucherno, "memo" = a.cmemo, "operID" = a.coperID, "operdate" = a.dt_oper, "croomno" = (Case left(a.cregno,1) when 'T' then '团体' when 'S' then '非住客' else a.croomno end) , "croomno1" = (Case left(a.cregno,1) when 'T' then '团体' when 'S' then '非住客' else a.croomno end) , & _
"ccomputer" = a.ccomputer FROM ft_his_xs_pay_2 a, ft_pu_payway c WHERE ( a.cpaywayno *= c.cpaywayno ) And ( a.dt_oper >= 开始时间 ) And ( a.dt_oper < 结束时间 ) And ( a.dt_oper >= '" & dtp1.value &"') And ( a.dt_oper < '" & dtp2.value &"')"
此主题相关图片如下:1.png