Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

concatenating Crosstables causes illegal combination

Hi,

I was trying to concatenate 2 crosstables but keep getting an "illegal combination of prefixes" error.

how do you do this?

These tables are on different tabs of the same excel spreadsheet

Thanks

Davie

6 Replies
Not applicable
Author

I do not get the error message you get, but what if you first try to concatenate all sheets into one table in QV, and then have the crosstable on that resident instead?

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

Don't think I was thinking during all of the three years from 2009 to 2012 about the question, I'm just new to the forum and QV in a whole but it definitelly impossible to concatinate with crosstable function - first you need to concatenate all parts of the table you'd like to cross-tab, than load data with use of crosstable function from the resident table which already contains all data you nee to cross-tab.

jonathandienst
Partner - Champion III
Partner - Champion III

Davie

Qv does not allow you to concatenate and cross table simultaneously. What you need to do is crosstable load the second table into a temporary table, and then concatenate the temp table to the first crosstable. If the fields are all the same, concatenate the two source tables into a temp table and then crosstable load the temp table.

This would be the logic in pseudocode for the first option:

Result:

CrossTable(...)

LOAD * Table1;

Temp:

CrossTable(...)

LOAD * Table2;

Concatenate(Result)

LOAD * Resident Temp;

DROP Table Temp;

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Jonathan:

I have a question about your example. If you Load the 'result' table and the 'temp' table and the fields were identical on both tables, would QV automatically concatenate the 2 tables?

TIA

Trung

eduardo_sommer
Partner - Specialist
Partner - Specialist

Hi Trung,

You are right, and the above script, in this case would incurr in 2 errors. Firstly, the Load * resident Temp would not find table Temp, since the second Load of the script have concatenated its rows to the Result table and did not create the Temp table. For the same reason, the Drop table Temp would fail.

Eduardo

mahendrankr
Contributor III
Contributor III

awesome.. Thanks . this helped me..