Discussion:
Update + XML + Where
(too old to reply)
Don Quijote de Nicaragua
2012-11-19 23:00:30 UTC
Permalink
Nothing happen when I try to update one record, any ideas what is wrong, thanks

UPDATE tblDetalleEntradas
SET IdLocalizacion = @IdLocalizacion
WHERE (
(IdEntrada = @IdEntrada) AND (
IdProductoxBodega IN (SELECT p.i.value('@IdProductoxBodega', 'Bigint')
FROM @XmlDoc.nodes('CambiarLocation/Producto') AS
p(i))
)
)
Nathan Liebke
2012-11-20 07:36:24 UTC
Permalink
Post by Don Quijote de Nicaragua
Nothing happen when I try to update one record, any ideas what is wrong, thanks
UPDATE tblDetalleEntradas
WHERE (
p(i))
)
)
Hmmmm... What do you mean by nothing happens? Do you get 0 row(s) updated or an error?

Do you get anything returned if you just run the select sub-query:

SELECT p.i.value('@IdProductoxBodega', 'Bigint')
FROM @XmlDoc.nodes('CambiarLocation/Producto') AS p(i)

Loading...