Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have many tables with Branches and different periods. For concatenate them Im using Autonumber Fuction but When QlikView concatenate the tables the results are differents that when I load QVDs Separately. I left an example file with Oct 2012. The real result in my Qvd is 22.262.560. The example Rec Castigo Gives me Diferent 8876479.
Thank you!
If I remember correctly the autonumber function only guarantee unique values for anything processed during execution of the load script. The counter is reset to 1 on every reload. So it could well generate different numbers for the same concatenation in different reloads. You should not store autonumber keys in the qvd if you create the qvd's separately. Store the original data in the qvd's and create the autonumber keys when you load the qvd's.
Thank you for your reply,
I stored the original data in my Qvds. And the I create the autonumber inside the Qvds created. If I understood well you mean that I Should be create the autonumber before of store?
No, you shouldn't store it at all. Only calculate it for joining the tables, don't store it.
Could you please give an example. I really I don't understand good this issue.
Thanks!
Sales:
select * from mydb.mysalestable;
store Sales into Sales.qvd (qvd);
drop table Sales;
SalesFact:
LOAD * FROM Sales.qvd (qvd);
JOIN (SalesFact)
LOAD DISTINCT
CustomerID,
CompanyID,
AutoNumber(CustomerID & '|' & CompanyID, 'Customer') as %SalesKey
RESIDENT SalesFact;
If you look at the sample that I put here. You can see that I have the same structure that your example. Just that Im using concatenate. look at the sheet "Union2".
Hi, I used Join and Left Join but I still having the same result. Any Ideas?
Thank you!