SQL报错求助
Select*intoTCfrom(selectt1.ItemCodeas物料单号,t1.dscriptionas物料名称,t1.quantityas数量,t0.TaxD...
Select * into TC from(
select t1.ItemCode as 物料单号,t1.dscription as 物料名称,t1.quantity as 数量,t0.TaxDate,T3.SalUnitMsr as 单位,
ISNULL((((t1.U_StdPrice)*(t1.quantity))/(t1.quantity )),0) as 单价
FROM OINV t0
left join inv1 t1 on t1.docentry=t0.docentry
left join OVTG t2 on t1.VatGroup=t2.code
left join OITM T3 on T3.Itemcode=t1.ItemCode
where T3.ItmsGrpCod ='119'
group by t1.ItemCode,t1.dscription,t1.quantity,t0.TaxDate,T3.SalUnitMsr,(((t1.U_StdPrice)*(t1.quantity))/(t1.quantity ))
)Ta
select * from TC
error information:
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'TC' in the database. 展开
select t1.ItemCode as 物料单号,t1.dscription as 物料名称,t1.quantity as 数量,t0.TaxDate,T3.SalUnitMsr as 单位,
ISNULL((((t1.U_StdPrice)*(t1.quantity))/(t1.quantity )),0) as 单价
FROM OINV t0
left join inv1 t1 on t1.docentry=t0.docentry
left join OVTG t2 on t1.VatGroup=t2.code
left join OITM T3 on T3.Itemcode=t1.ItemCode
where T3.ItmsGrpCod ='119'
group by t1.ItemCode,t1.dscription,t1.quantity,t0.TaxDate,T3.SalUnitMsr,(((t1.U_StdPrice)*(t1.quantity))/(t1.quantity ))
)Ta
select * from TC
error information:
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'TC' in the database. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询