Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Say If I have already had the straight table in the front end:
Table Name: Salesamt
| Month | Amount | 
|---|---|
| 201401 | 400 | 
| 201402 | 100 | 
| 201403 | 200 | 
| 201404 | 500 | 
Can I use this table to create another table by using SQL?
SQL Select Month
Sum(Amount)
From Salesamt
Group by Month
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		First, you can only use SQL to access SQL DBMS, QlikView itself is no such system (i.e. its internal tables are not accessible via SQL).
Then, you can't access chart objects like a straight table from your script.
You can maybe create what you want using the data loaded in the script, but this you probably know already.
 
					
				
		
 Joseph_Musekura
		
			Joseph_Musekura
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You can't do it directly. If you want to use data from this straight table,
1. You can export the table data to excel (or a qvd or text file)
2. and load data from that created file in your qvw document
3. Create new table with loaded data
But why should you go through this process? Check also this discussion
http://community.qlik.com/message/357049#357049
Regards,
 maxgro
		
			maxgro
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		you can create another table (qlikview table) in the script using qlik language (not sql)
you can create a chart with month and sum(amount) (not sql)
you can't create qlikview table from a qlikview table using sql
you can't create a chart from a qlik table using sql
 
					
				
		
Thanks. It's just my wild imagination.
 
					
				
		
Thanks. Very detailed steps.
 
					
				
		
Thank you. Simple and clear.
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can recreate the contents of the straight table using the aggr() function. For example, if you wanted to extract the largest Amount by month from your example table.
=max(aggr(sum(Amount), Month))
-Rob
