select count(1) from (select distinct(cs.CustomerID),cs.CustomerName,cs.RegTime,cs.CustomerID,cs.Email,cs.TelePhone,
cs.Mobile,cs.Province,cs.LastLoginTime from [Moon_Customer] as cs (这里报错) inner join [Moon_Order] as o on cs.CustomerID =
o.CustomerID where o.CustomerID not in( select o.CustomerID from [Moon_Order] as o where o.OrderStateID=4 ) and
cs.RegTime between '1900/1/1 0:00:00' and '2012/5/7 12:38:04' ) as tab
帮忙看下 到底是神马情况,我都看蒙圈了!
这个 sql 语句也写的太牛了。。 真是这样才查到结果 ,那不是表设计的有问题。
亲,我解决了,sql语句一般~~