I want to convert the sql query to QlikView Script. Below are the mentioned query. Also if it possible to convert into VB macro, it is also helpful for me to execute it by QV macro.
DECLARE @LLNO BIGINT;
DECLARE @LLBK BIGINT
SET @LLNO = 1;
WHILE @LLNO<=100
BEGIN
SET @LLBK =(SELECT DISTINCT LOID FROM [dbCertifiedInventory_Live].[dbo].QLIKVIEW_LOTID_IDENTITY WHERE SR_NO =@LLNO)
That's not an sql query, but a block of code that appears to execute a loop that executes a stored procedure that inserts data into some table. This cannot be converted to Qlikview script. The best you can do is create a stored procedure that executes that block of code and call that stored procedure from the qlikview script: SQL EXEC [dbo].[MyNewSP];