update con select
Publicado por hilda (7 intervenciones) el 11/11/2003 17:12:51
en que estoy mal?
cn.Execute "UPDATE acumulado " _
& " SET '" & campo & "'=" _
& "(SELECT Sum([restante]) AS RS " _
& " FROM PPAGOS INNER JOIN (VENTAS INNER JOIN acumulado ON VENTAS.fra_clv = acumulado.fraccionamiento) ON PPAGOS.concepto = acumulado.concepto " _
& " WHERE (((VENTAS.STATUS)='" & STVEN & "') AND ((PPAGOS.concepto)='" & tipop1 & "') AND (PPAGOS.fecha)<= " & "#" & Format(variablenombre, "mm/dd/yy") & "#" & " and (PPAGOS.fecha)>= " & "#" & Format(varant, "mm/dd/yy") & "#" & ") " _
& " GROUP BY VENTAS.fra_clv);"
cn.Execute "UPDATE acumulado " _
& " SET '" & campo & "'=" _
& "(SELECT Sum([restante]) AS RS " _
& " FROM PPAGOS INNER JOIN (VENTAS INNER JOIN acumulado ON VENTAS.fra_clv = acumulado.fraccionamiento) ON PPAGOS.concepto = acumulado.concepto " _
& " WHERE (((VENTAS.STATUS)='" & STVEN & "') AND ((PPAGOS.concepto)='" & tipop1 & "') AND (PPAGOS.fecha)<= " & "#" & Format(variablenombre, "mm/dd/yy") & "#" & " and (PPAGOS.fecha)>= " & "#" & Format(varant, "mm/dd/yy") & "#" & ") " _
& " GROUP BY VENTAS.fra_clv);"
Valora esta pregunta


0