Hi
I'm trying to use Rowno() as a key in a table that I need to "split" the fields. I have a fact table called "Datos" and a second table related called "DatosDetail".
The table datos is loaded in Script 1 and stored to a qvd. Then, in script 2, I want to load the same table but splitted. To connect this splitted data, i'm creating a key with the function rowno(). As far as I know, is that the function rowno() creates a the dame key for each row.
But this is not working, and I don't know why, because the fields are getting different row number in each table.
Hope somebody can explain me why this is not working.
Thanks!
Script1:
Datos:
Origen,
[Tipo Venta],
...;
SQL Select * from exampletable;
Store Datos Into Datos.qvd (qvd);
Script2:
Datos:
LOAD 'DW'&RowNo() as %LlaveWeekPrograma,
Origen,
...
FROM $(RepositorioQvd)DetallesWeek.qvd (qvd);
DatosDetail:
LOAD 'DW'&RowNo() as %LlaveWeekPrograma,
[Tipo Venta],
...
FROM $(RepositorioQvd)DetallesWeek.qvd (qvd);
On what field bases you are generating keys' Because, 'Text' & RowNo() returns only one not for until rows available from table?
May be you can use AutoNumber() function
On what field bases you are generating keys' Because, 'Text' & RowNo() returns only one not for until rows available from table?
May be you can use AutoNumber() function
Hi Anil
I was not generating the keys based on a field, but instead I was trying to generate it based on the position on the table. But it is not working. With autonumber it works, but I wanted to know why it is not working based on position instead of fields.
Regards
Because, 'DW' & RowNo() returns only one where AutoNumber() generate sequential. Read more from help
If you found solution, May be you can close this thread