Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
My document (qvw file) has a connection with a MS-SQL database.
In my script I use SQL statements like
Customer:
SQL
Select * from Customer;
Suppose I've a variable StartDate
SET StartDate=MakeDate(2012,01,01);
Is there a way to use the variable StartDate in a SQL statement?
Like
Customer:
SQL
Select * from Customer where Customer.Date >= StartDate;
I understand that in this example I better switch to QlikView syntax but I've fairly complex SQL statements that are hard to translate.
Try this:
Customer:
SQL
Select * from Customer where Customer.Date >= '$(StartDate)';
Try this:
Customer:
SQL
Select * from Customer where Customer.Date >= '$(StartDate)';
Hi, it's an issue of format.
do something like that:
vDateString=Year( StartDate )&num(Month( StartDate ))&Day( StartDate );
Customer:
SQL
Select * from Customer where Customer.Date >=
CONVERT(datetime, '$(vDateString'), 112)
Thank you
Thank you