Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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
 
					
				
		
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
		
			maksim_senin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
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
		
			eduardo_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			mahendrankr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		awesome.. Thanks . this helped me..
