Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 solomonadjei
		
			solomonadjei
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Afternoon Experts,
Could anyone help me understand why I do get "Field not found error / Field 'STP' not found " from below script.
Thanks.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 Gysbert_Wassena
		
			Gysbert_WassenaYou're only loading the fields [TRUST CODE] and [TRUST NAME] from the TRUSTS.xls file. You don't load an STP field from the source file so you can't use STP in that load statement as a source field.
 
					
				
		
 punitpopli
		
			punitpopli
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Apply Map will work when you have the filed already in the table you are referring, as your STP filed is not available in the load statement its giving error.
either follow the solution what Sunny had suggested or try below :
Load *,
ApplyMap('Table', STP) as STP;
Load
[TRUST CODE]
[TRUST NAME] as STP
from table name;
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this
ApplyMap('Table', [TRUST CODE]) as STP
					
				
			
			
				
			
			
			
			
			
			
			
		 Gysbert_Wassena
		
			Gysbert_WassenaYou're only loading the fields [TRUST CODE] and [TRUST NAME] from the TRUSTS.xls file. You don't load an STP field from the source file so you can't use STP in that load statement as a source field.
 
					
				
		
 punitpopli
		
			punitpopli
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Apply Map will work when you have the filed already in the table you are referring, as your STP filed is not available in the load statement its giving error.
either follow the solution what Sunny had suggested or try below :
Load *,
ApplyMap('Table', STP) as STP;
Load
[TRUST CODE]
[TRUST NAME] as STP
from table name;
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 solomonadjei
		
			solomonadjei
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 solomonadjei
		
			solomonadjei
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 solomonadjei
		
			solomonadjei
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 Gysbert_Wassena
		
			Gysbert_Wassena 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		