delete data frm tableA n put tat in tableB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanku123
    New Member
    • Apr 2013
    • 1

    delete data frm tableA n put tat in tableB

    I need to delete sme data frm a tableA and put that data in other tableB..data in tableA must be deletd..both can be done in same db2 query?.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    No there isn't one query that does it. Why do you need it to be one query? Rather select into a cursor and then use load from cursor for the target table. See here for more details http://www.ibm.com/developerworks/da...m-0901fechner/

    Comment

    • vijay2082
      New Member
      • Aug 2009
      • 112

      #3
      Hi,

      update and delete are 2 transactions and can't be provided in same query. This is against RDBMS principles and is there to provide the data integrity.

      Cheers, Vijay

      Comment

      Working...