Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I have two stored procedures: the first one results in a list of all stores of a company, having ID and Name.
The second one returns all the sales of the company having storeID, TransactionID and value.
The second SP receives as parameter the storeID.
Is is possible to load the first stored procedure and for each store that it returns, use it to load the second stored procedure usign the storeID?
I'd like to make something like this:
Load SP_stores;
For each ID in
LOAD
*;
SQL exec SP_Stores;
SQL exec SP_Salles ID;
As I am new in qlik I'm not sure about the nomenclature.
Is this possible? Can you please help me?
NOTE: The tables i'm using are way more complex, but I made them this way just to make it easier to understand.
Thanks in advance,
Miguel Cunha
Hi Miguel,
Try something like this:
SP_Stores
Load
LOAD
*;
SQL EXEC SP_Stores;
for each vID in FieldValueList('ID)'
SP_Sales:
LOAD
*;
SQL EXEC SP_Salles $(vID);
next;
Felipe.
Hi Miguel,
Try something like this:
SP_Stores
Load
LOAD
*;
SQL EXEC SP_Stores;
for each vID in FieldValueList('ID)'
SP_Sales:
LOAD
*;
SQL EXEC SP_Salles $(vID);
next;
Felipe.
That's it!
Stores:
LOAD
*;
SQL exec SP_Stores;
for each vID in FieldValueList('ID')
Salles:
Load
*;
SQL exec SP_Sales $(vID);
next;
Thank you very much Felip!
No problem Miguel, glad it helped .