Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
So below is a simplified version of my query..
Opportunity:
LOAD Id,
Name,
OwnerId,
Account.OwnerId,
Broker_Account__r.OwnerId;
SQL SELECT Id,
Name,
OwnerId,
Account.OwnerId,
Broker_Account__r.OwnerId
FROM Opportunity
The problem is:
So, QV wants me to alias the field because it doesn't like dots, and SOQL won't let me alias and will include the dot!
Any idea on how I get around this?
 
					
				
		
Wanted to update the thread in case someone was looking for an answer.
I created two Mapping tables with the joined fields and applied the map within the LOAD statement of the Opportunity table
 
					
				
		
 francoiscave
		
			francoiscave
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Fadi,
If you use the brackets ? or maybe the dobble quote ""
Like [Broker_Account__r.OwnerId]
François
 
					
				
		
 jjordaan
		
			jjordaan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Fadi,
You can use the replace statement, like Replace(Replace([SQL Table Name],'.','_'),'/','_')
Hope this helps.
 
					
				
		
Sadly, that didn't work.
 
					
				
		
Could you elaborate on how to use the replace? If used in the Load statement it'll cause the same issue with the dot, no?
 
					
				
		
 jjordaan
		
			jjordaan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This is how I use it.
Tables:
LOAD * INLINE
[
SQLTableName, SQLTableAlias, Active
Item, Item, 1
];
Tables2BeLoaded:
LOAD
Replace(Replace(SQLTableName,'.','_'),'/','_') AS SQLTable
,SQLTableAlias
,Incremental
,Active
Resident Tables
Where Active = 1;
And then start the loop over the tables with a FOR NEXT
 
					
				
		
HI there,
You can try this -
Opportunity:
SQL SELECT Id,
Name,
OwnerId,
Account.OwnerId,
Broker_Account__r.OwnerId
FROM Opportunity
Store Opportunity into Opportunity.qvd(qvd);
Drop Table Opportunity;
Opportunity:
Load *
From Opportunity.qvd (qvd);
Now in the above qvd table you can do aliasing or any other qlikview function you want.
Thanks
 
					
				
		
I attempted this as a first step:
Opportunity:
SQL SELECT Id,
Name,
OwnerId,
Account.OwnerId,
Broker_Account__r.OwnerId
FROM Opportunity
The result was pulling correctly for Id, Name and Owner Id. But it pulled the fields Account.OwnerId and Broker_Account__r.OwnerId as "Account" and "Broker_Account__r" and gave them all null values.
I verified that the SOQL itself works in salesforce, so I know it's not returning nulls there.
My guess is that it pulled data for Account.OwnerId and Broker_Account__r.OwnerId but wrote data in QV datamodel for "Account" and "Broker_Account__r" which don't exist, thus NULL...
 anbu1984
		
			anbu1984
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
Opportunity:
LOAD Id,
Name,
OwnerId,
OwnerId_Account,
OwnerId_Broker_Account__r ;
SQL SELECT Id,
Name,
OwnerId,
Account.OwnerId As OwnerId_Account,
Broker_Account__r.OwnerId As OwnerId_Broker_Account__r
FROM Opportunity
 
					
				
		
Sadly that did not work, SOQL doesn't allow aliasing.
