SQL - update con select

 
Vista:

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);"

Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:update con select

Publicado por Isaías Islas (5072 intervenciones) el 11/11/2003 18:07:33
¿Es SQL Server?, ¿Ya probo su script en el Query Analyzer?,¿Porque NO lo hace un STORE PROCEDURE y simplemente le pasa los paramentros?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar