Sorry if this has been asked before but does Qlik enable you build functions?
In SQL Server we would have build a procedure or function to achieved complex row by row analysis, is there something similar in Qlik?
Thanks for any help.
Qlik will only allow you to write user defined procedures in the syntax similar to that of VB. No user defined functions possible.
I agree but they are not quite the same as a procedure/function where one can write some complex logic
Surely some things might require more efforts but others will be even easier as in (T)SQL so that I think that everything what could be done in (T)SQL could be done in Qlik too, but in different ways. Further I think that adapting the logics to the way Qlik works is better as trying to keep the SQL logic at least if one want to use the advantages of Qlik.
I have also been looping at resident tables and loops.
Would it make sense to do something like the following?
1 Load up a distinct list of custmers from a resident table
2 Loop through each customer
3 Load up a temporary table of transaction records for the specific customer in the loop
4 Copy the customer record and processing to another table
5 Drop the temporary table
6 Loop to the next customer
Essentially being left with a copy of the data with the processing for each customer?
There could be a better way and I am limiting myself to relational DB thinking... but basically using the resident tables as curors and loops in TSQL
1/2 don't need a resident load because a loop over the fieldvalues would be enough like here:
For 3 could the for each variable be used as filter within the where-clause.
By 4 I don't understand the meaning what should happens.
5 just add: drop table YourTableName;
6 see to 1/2
But what is the aim to create a single table for each customer - it don't seemed to be a store as file so it's related to 4?
In Qlik, you can create functions and also sub routines.
For sub routines , you would use Sub Routine_name() .... End Sub;
For Functions, You would Function Function_name() ..... End Sub;