第 1 行: '=' 附近有语法错误 急 15
Setrs=Server.CreateObject("ADODB.Recordset")qsrq=Trim(Request.Form("nian1")+"-"+Reque...
Set rs = Server.CreateObject("ADODB.Recordset")
qsrq = Trim(Request.Form("nian1")+"-"+Request.Form("yue1")+"-"+Request.Form("ri1"))
zzrq = Trim(Request.Form("nian2")+"-"+Request.Form("yue2")+"-"+Request.Form("ri2"))
sql = "SELECT 编码,品名 销售总数 = sum(销售数量), 销售总金额 = (销售数量*销售价格) FROM t_xs,t_yp where t_xs.编码 = t_yp.编码 And 销售日期 Between '"&qsrq&"' And '"&zzrq&"' GROUP BY 编码,品名"
rs.Open sql,conn,3
%> 展开
qsrq = Trim(Request.Form("nian1")+"-"+Request.Form("yue1")+"-"+Request.Form("ri1"))
zzrq = Trim(Request.Form("nian2")+"-"+Request.Form("yue2")+"-"+Request.Form("ri2"))
sql = "SELECT 编码,品名 销售总数 = sum(销售数量), 销售总金额 = (销售数量*销售价格) FROM t_xs,t_yp where t_xs.编码 = t_yp.编码 And 销售日期 Between '"&qsrq&"' And '"&zzrq&"' GROUP BY 编码,品名"
rs.Open sql,conn,3
%> 展开
展开全部
sql = "SELECT 编码,品名 销售总数 = sum(销售数量), 销售总金额 = (销售数量*销售价格) FROM t_xs,t_yp where t_xs.编码 = t_yp.编码 And 销售日期 Between '"&qsrq&"' And '"&zzrq&"' GROUP BY 编码,品名"
改为
sql = "SELECT 编码,品名,sum(销售数量) as 销售总数,销售数量*销售价格 as 销售总金额 FROM t_xs,t_yp where t_xs.编码 = t_yp.编码 And 销售日期 Between '"&qsrq&"' And '"&zzrq&"' GROUP BY 编码,品名"
改为
sql = "SELECT 编码,品名,sum(销售数量) as 销售总数,销售数量*销售价格 as 销售总金额 FROM t_xs,t_yp where t_xs.编码 = t_yp.编码 And 销售日期 Between '"&qsrq&"' And '"&zzrq&"' GROUP BY 编码,品名"
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询