Deleted data from table

  • Hi to all ,

    I am currently have data in Table A. i process that deletes the data from Table A, that exports the data before deletion and stores the data in an xml file stored on the file system. What i wanting to be able to do is when i run a select statement against Table A, i want the result set to include the data from the xml file as well as the data from Table A.

    Thanks

    Manjunath

  • Possibly OPENROWSET and read from the file (assuming it's not disabled on your server)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • i have 10000 rows in Table A. i process that deletes the 500 rows from Table A, that exports the data before deletion and stores the data in an xml file stored on the file system.now i am getting the deleted rows from table ##XmlImportTest1 by importing from xml file but What i wanting to be able to do is when i run a select statement against Table A, i want the result set to include the data from the xml or ##XmlImportTest1 file as well as the data from Table A.So now what i have to do ? please tell me

    Thanks

  • There's no real easy way to do that, and it's not something SQL can be configured to do. A CLR function would be my guess as to one way, though it would need elevated privileges, otherwise maybe OpenRowSet along with some of the XQuery or OPENXML functions.

    Seriously not an easy thing to do unless I've missed something.

    Why delete data out of a table if you still need it? Wouldn't it be easier to move it to a archive table?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply