sql server 2008 - Using Update whilst using Select in SQL -
my sql programming limited why im having problem basic code. trying update record im retrieving it, know can update if split 2 procedures update records retreiving consistancy sake. anyway below code , show trying accomplish:
update dbo.asns set sent = 'yes' asnnumber in ( select * dbo.asns sent = 'no' xml auto, elements, root('asns') )
i think mean this:
update dbo.asns set sent = 'yes' output inserted.* sent = 'no' xml auto, elements, root('asns')
see here
Comments
Post a Comment