View previous topic :: View next topic
|
Author |
Message |
anandhi28
New User
Joined: 07 Mar 2005 Posts: 8 Location: Bangalore
|
|
|
|
In QMF in need to select a few records from the production environment based on a condition and insert the selected records into the test environment.
In QMF of the test environment i can select the records from the production table also.
But the resultant set is 500+ records . i need to use a query that will load these records into the test .
For example
SELECT *
FROM CORPD000.XPPERP0V
WHERE "EMP_SCL_SCUTY_NO" =+389722631
FOR FETCH ONLY WITH UR
I need to save the result of this query and add that resultant rows into the Test environment table
INSERT INTO DBJB.CORPQ003.XPPERP0V
VALUES (from the prev query ) .
Can you guys please suggest me
1) how to save the resultant of the first query into a temp table and load it into the test table.
2) i am looking for the specific SQL commands that i can use in the QMF. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
Back to top |
|
|
anandhi28
New User
Joined: 07 Mar 2005 Posts: 8 Location: Bangalore
|
|
|
|
WHEN i try to run a nestes query like the below
INSERT INTO CORPQ003.XXPPERPT (
SELECT *
FROM DBJC.CORPD000.XPPERP0V
WHERE "EMP_SCL_SCUTY_NO" =+389722631 )
it results in an error
QUERY MESSAGES:
The query reference to a remote object is invalid.
but i can execute the
SELECT *
FROM DBJC.CORPD000.XPPERP0V
WHERE "EMP_SCL_SCUTY_NO" =+389722631
seperately in the same system.
So i need to save the resultant set into temp and use this temp table to load the test system table. |
|
Back to top |
|
|
rpuhlman
New User
Joined: 11 Jun 2007 Posts: 80 Location: Columbus, Ohio
|
|
|
|
Anandhi ... do you have QMF for Windows? |
|
Back to top |
|
|
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
do you have access to both production table and test table @ a time? means is it possible to use both production and test table in a single query |
|
Back to top |
|
|
frudo
New User
Joined: 16 Aug 2005 Posts: 5
|
|
|
|
Hi,
you can download the result from a query into a datset using the following command
export data to "name of your dataset".
transfer the dataset from production to test. (Not sure what you use in your shop).
To insert the data do the foll in QMF,
type the command
Import data from "dataset name"
you will get a pop up panel, enter the name of the table, columns and other info. |
|
Back to top |
|
|
|