Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a script which is generating the dimension tables dynamically so we are not sure what are the tables names going to be. We just know that the table names are going to be started with C_
I wonder if at the end of script, there is someway to dynamically get the names of all the tables that start with C_ and then drop them all
Shah
FOR i = 0 to NoOfTables()
LET vTabNam = TableName($(i));
TRACE '$(vTabNam)';
If '$(vTabNam)' Like 'C_*' Then
Drop Tables '$(vTabNam)' ;
ENDIF;
NEXT i
Hi Anbu,
It works..thanks. One more question though, If I wanted to add another condition to make it like
If '$(vTabNam)' Like 'C_*' and '$(vTabNam)' not Like 'C_D_*' then
How can I do that in Qlikview? I guess there is no NOT LIKE operator in Qlikview so what would be the alternative?
Shah
Not('$(vTabNam)' Like 'C_D_*')
Or
Left('$(vTabNam)',1,4) <> 'C_D_'
Hi
Try like below
If
not
('$(vTabNam)' like
'C_D*' ) and
'$(vTabNam)' like
'C_*' Then
Drop
Tables
'$(vTabNam)' ;
ENDIF
;
NEXT
i