Discussion Board for collaboration on QlikView Scripting.
know the name of the db hello I would like to kindly help. I need to load and concatenate together the same table, we call to exemplify INVOICES, several data base. for the individual lines of coming conoscerela INVOICES I thought of adding a field in the table the name of the DB. I do not know if you know the name of the DB and how do you add in an additional field in the load the contents of this possible variable containing the name of the DB. Thank you in advance for any feedback
Go to Solution.
[Invoices]:LOAD *,'Database1' as Database;SQL SELECTInvoice,AmountFROM Database1;CONCATENATE ([Invoices])LOAD *,'Database2' as Database;SQL SELECTInvoice,AmountFROM Database2;
Or maybe this if you're loading exactly the same fields from each database:
FOR EACH vDatabase IN 'Database1','Database2' [Invoices]: LOAD * ,$(vDatabase) as Database ; SQL SELECT Invoice ,Amount FROM $(vDatabase) ;NEXT
perfect. was what I wanted. it works. thank you very much.