- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GoTo command in script
Hi all,
Is there a way to to do a "GOTO" command in QlikView script? Currently I have a situation where I need to do some data checking before executing the load script. The sample scenerio:-
ExecDate=select top Date from ControlTable;
if not exists( select * from Data where Date=$(ExecDate)) then
goto Error;
else
LOAD * from Data2;
end if;
<Other load statement here... will be skipped if there is an error in the data checking above)>
Error:
LET errormsg='No data for this date';
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I think, we don't have facility to transfer the control from one place to other place to execute the commands.
My suggesting is, you can try as below:
ExecDate=select top Date from ControlTable;
if exists( select * from Data where Date=$(ExecDate)) then
LOAD * from Data2;
<Other load statement here... will be skipped if there is an error in the data checking above)>
Else
LET errormsg='No data for this date';
end if;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
You can try it through Macro statement.
Regards
Sunil kumar Panda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunil,
Thanks for the suggestion. But do you have any other method? This is because macro might not work with Publisher.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I think, we don't have facility to transfer the control from one place to other place to execute the commands.
My suggesting is, you can try as below:
ExecDate=select top Date from ControlTable;
if exists( select * from Data where Date=$(ExecDate)) then
LOAD * from Data2;
<Other load statement here... will be skipped if there is an error in the data checking above)>
Else
LET errormsg='No data for this date';
end if;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the suggestion. I guess there is no other method other than using the else statement.