Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm running below script.
LOAD Distinct
Date(floor(LotStartDateTime),'YYYY-MM-DD hh:mm:ss.fff') as TempMaxDateTime,
Date(WeekEnd(LotStartDateTime),'DD-MM-YYYY') as WeekEndDate
Resident LatestWeek;
Let vWeekEndDate=Peek('WeekEndDate',-1);
Temp1:
LOAD Date(Max(TempMaxDateTime),'DD-MM-YYYY') as MaxDateTime
Resident Temp;
Let vMaxDate=Peek('MaxDateTime',-1);
LOAD *,
LotStartDateTime AS TempLotStartDateTime
;
SQL SELECT *
FROM "Split Data".dbo."Week2"
Where
Day(LotStartDateTime) >= Day('$(vMaxDate)')
and
Day(LotStartDateTime) <= Day('$(vWeekEndDate)')
;
When i run the above query in qvw file, i'm getting the below error message as shown in second image.
In sql dates are like this
2011-06-08 00:10:12
2011-06-08 14:04:25
2011-06-09 11:00:04


I think, you should create string variable which contains all SQL + variables (dates) so SQL script is converted to SQL format and only then run the SQL script. Cause, SQL is using native script enterpritator.
Hi
Remember that all the command after SQL is passed to SQL Server and executed there, not by QV. The command must be in a form that SQL Server understands, and the Day function in SQL server does not accept a string parameter.
Use something like this in your original script:
Let vWeekendDate = Date(Peek('WeekEndDate',-1), 'YYYY.MM.DD');
... Day(LotStartDateTime) = Day(Convert(datetime, '#(vWeekendDate)', 102))
Check SQL Books Online for Convert or Cast.
Hope this helps
Jonathan
Dear Team,
I have one calendar which is coded in JavaScript. this i wanted to make it as QlikView extension object.
I am sharing the HTML, JavaScript and CSS file for reference.
Please guide / help in doing
Thanks in advance,
Thanks & Regards,
Venkatesh Salla
eTechnoforte FZC, PO Box No 120094,
SAIF Zone, Sharjah, UAE. Phone: +971 6 5578053
Email: <mailto:venkatesh@technoforte.co.in> venkatesh@technoforte.co.in
Hi V
I suggest that you create a new post for this request. It is not really the same thing as this post and you are more likely to get help.
Regards
Jonathan