Migrating Queries from One User To Another从一个用户迁移到另一个查询

来源:互联网 发布:tensorflow可视化 编辑:程序博客网 时间:2024/04/30 12:27

If you ever have a need to migrate queries from one user to another, you can do it quickly and easily with this useful SQL script. If you want to make the Query Public, simply change the NEWPSUSERID to a blank.

[sql] view plaincopyprint?
  1. UPDATE PSQRYDEFN SET OPRID = 'NEWPSUSERID'WHERE OPRID = 'OLDPSUSERID' 
  2. UPDATE PSQRYRECORD SET OPRID ='NEWPSUSERID' WHERE OPRID ='OLDPSUSERID' 
  3. UPDATE PSQRYFIELD SET OPRID = 'NEWPSUSERID'WHERE OPRID = 'OLDPSUSERID' 
  4. UPDATE PSQRYEXPR SET OPRID ='NEWPSUSERID' WHERE OPRID ='OLDPSUSERID' 
  5. UPDATE PSQRYBIND SET OPRID = 'NEWPSUSERID'WHERE OPRID = 'OLDPSUSERID' 
  6. UPDATE PSQRYSELECT SET OPRID ='NEWPSUSERID' WHERE OPRID ='OLDPSUSERID' 
  7. UPDATE PSQRYSTATS SET OPRID = 'NEWPSUSERID'WHERE OPRID = 'OLDPSUSERID' 
  8. UPDATE PSQRYPREFS SET OPRID ='NEWPSUSERID' WHERE OPRID ='OLDPSUSERID' 
  9. UPDATE PSQRYEXECLOG SET OPRID = 'NEWPSUSERID'WHERE OPRID = 'OLDPSUSERID' 
  10. UPDATE PSQRYDEL SET OPRID ='NEWPSUSERID' WHERE OPRID = 'OLDPSUSERID 

原创粉丝点击