Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
All
I'm having issues using the If statement on the scripting back end of QlikView
Can somebody explain why this doesn't work?
If Left([Insurer Policy Number],7) = 'GSPC701' Then 'Skippy'
Else 'Sampras'
End If as [Test],
Thanks in advance
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you tried this?
Load *,
If ( Left([Insurer Policy Number],7) = 'GSPC701' ,'Skippy' ,'Sampras' ) as Test ;
SQL SELECT 
*
FROM SkippyReporting.dbo.Core_Product_All_Txns;
 
					
				
		
Hi, It's like this.
LOAD
If (Left([Insurer Policy Number],7) = 'GSPC701','Skippy', 'Sampras')as [Test]
from file;
Regards.
 
					
				
		
 CELAMBARASAN
		
			CELAMBARASAN
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		My previous post has the solution, didn't you tried that?
Load *,
If ( Left([Insurer Policy Number],7) = 'GSPC701','Skippy' ,'Sampras' ) as [Test];
SQL SELECT
       *
FROM SkippyReporting.dbo.Core_Product_All_Txns;
 
					
				
		
this is my existing code. how do I factor your suggestions into this?
ODBC CONNECT TO lassie (XUserId is GaLDOJdJDaSYFVFMNLZGHXUNBbaKGYVMBbYKWdA);
SQL SELECT 
    *
FROM SkippyReporting.dbo.Core_Product_All_Txns;
