Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. USE NewDatabase
  2.  
  3. SET NOCOUNT ON
  4. SET STATISTICS TIME ON
  5. SET IDENTITY_INSERT Data ON
  6.  
  7. INSERT INTO NewDatabase.Data
  8. (
  9. Id,
  10. TimeIn,
  11. TimeOut,
  12. WaitingTime,
  13. RepairTime,
  14. ErrorCode,
  15. LineName,
  16. MachineName,
  17. ModuleNo,
  18. LaneNo,
  19. ProductMode,
  20. ProgrameName,
  21. PanelNo,
  22. Status,
  23. PICName,
  24. MachineType,
  25. ActionTaken,
  26. TimeInsert,
  27. Flag,
  28. ProcessId
  29. )
  30. SELECT
  31. Id,
  32. TimeIn,
  33. TimeOut,
  34. WaitingTime,
  35. RepairTime,
  36. ErrorCode,
  37. LineName,
  38. MachineName,
  39. ModuleNo,
  40. LaneNo,
  41. ProductMode,
  42. ProgrameName,
  43. PanelNo,
  44. Status,
  45. PICName,
  46. MachineType,
  47. ActionTaken,
  48. TimeInsert,
  49. Flag,
  50. 1
  51. FROM OldDatabase.Data
  52.  
  53. SET STATISTICS TIME OFF
  54. SET NOCOUNT OFF
  55. SET IDENTITY_INSERT Data OFF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement