I'm struggling with a problem where I'm suppose to copy the data from table Technical_year in prod environment to Technical_year in QA environment.
They are actually views and the definition looks today like:
For QA environment:
REPLACE VIEW DWQ_QFU.MAN_TECH_YEAR
For Prod environment:
REPLACE VIEW DWP_QFU.MAN_TECH_YEAR
My job is to write a sql that copies that data from Prod to QA.
My question is, which is the most easiest and effeicient way to do this?
Actually I don't know what TPT or TPT Wizard is...
Mostly I just check my queries from BO Web Intelligence in Teradata and very seldom I do this kind of tasks.
I'm wondering if there is some general script for copying the data from one table into another.
I suggest you talk to the DBA --- if you can just do an insert ...select or how much data you want ...and when you can do .... not to disturb the production system.
Ok, I see. Thank you for your help.
Let us think that I want to fill table A with data from table B. How should I then write the SQL?
You can use :
INSERT INTO your_databasename_QA.A SELECT * FROM your_databasename_PROD.B;
I give your_databasename_QA and your_databasename_PROD as example only.
You can also think of using MERGE. But now you can use the above insert ...select