Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 sims
		
			sims
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How can I declare the SQL variable below in Qlik sense script and use them in the SELECT statement.
Thanks in advance.
DECLARE @startDate DATETIMEOFFSET = NULL
 DECLARE @endDate DATETIMEOFFSET = NULL
 DECLARE @transactionDateTimeFromLocal DATETIME = CONVERT(DATETIME, SWITCHOFFSET(@startDate, '+00:00'))
DECLARE @transactionDateTimeToLocal DATETIME = CONVERT(DATETIME, SWITCHOFFSET(@endDate, '+00:00'));
SELECT
-------
 dbodlovich
		
			dbodlovich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi!, i have the same doubt, did you solve it?
 
					
				
		
 Or
		
			Or
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can use SET or LET to set Qlik variables and then use those in your select statements. See e.g. https://community.qlik.com/t5/QlikView-App-Dev/Can-QV-use-variables-in-SQL-SELECT/m-p/38883
