Populating an empty table with data from a temp table
Hello all. I have created an empty table using the LOAD * INLINE statement. Now I simply want to take data from a temp table created previously and store certain values in this new empty table. Here is my code so far:
LOAD * INLINE [
SELECT DISTINCT PSPLN
ORDER BY PSPLN;
How do you "select into" the empty table from the the resident table? Thanks!!!
Re: Populating an empty table with data from a temp table
Your select statement needs to be a load statement because you want to get data from a resident table. You can add the data to tblTasks with the concatenate keyword:
tblTasks: LOAD * INLINE [ Task_Number, available ];
CONCATENATE(tblTasks) LOAD DISTINCT PSPLN RESIDENT tblPull ORDER BY PSPLN;
Note, it only retrieves distinct values of the PSPLN field. So what will happen is that a new field PSPLN will be added to tblTasks with the distinct values that are retrieved with the select statement. This doesn't make sense to me, so it's probably not what you want. Maybe you need to explain in more detail what should happen. An example document and sample data would be helpful.