I am trying to append datasets into one table using Concatenate (they two queries in an MS Access database). I have pasted a jpg of the code and the resulting table. All of the fields are preceded with "temp_Complaints-1". I only want "Complaints".
What am I doint wrong in the code?
Try like below:
LOAD * ;
SQL SELECT * FROM 'qryComplaints_up';
LOAD * ;
SQL SELECT * FROM 'qryComplaints_PCR' ;
QUALIFY * ;
LOAD * Resident temp_Complaints ;
UNQUALIFY * ;
since you have loaded temp_Complaints table and agina trying to load from same table you are getting temp_Complaints-1 as name . As kiran suggested place a table name before load statement it may solve your problem or
Instead of loading from resident table for this purpose is good so place a table name and qualify * at line number 1 and use a join to join these two table if necessary.
Just a +1 to using CONCATENATE and QUALIFY. And a warning to all QV newbies who do not yet understand that QV is a completely different animal. This may help you avoid the pain of 'what-am-I-doing-wrong' situations.
I had two tables in different SQL servers. Both were named were named Invoices and had the same column structure. I needed to load the data from these two tables into one table (like in SQL UNION ALL).
The problem was that I had QUALIFY *; in the script, and I did not pay much attention to it.
So when I was trying to concatenate the two tables, the fields of the first table had the prefix Invoices, while the fields from the second table showed up with prefix Invoices-1.
When I removed the QUALIFY *; concatenation worked like a charm.
Bottom line: watch out for QUALIFY *; when you do CONCATENATE.