Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

copy records of one row to all other rows based on ID

Hello community,

I have the following DB-table:

table.PNG

What I want to achieve is to copy the records of row no. 1 for the columns customer, project, plant where sheetname = "sheet 1" based on ID.

I don't want to insert the records to the DB, all I want is to get rid of the null values and get the rigtht output (not just row 1) when I select a certain customer for example.

Is this something I can do with a qlikview script (if yes - how?) or do I have to go the SQL way?

thank you.

2 Replies
marcus_sommer

If ID is sorted you could use peek() for this in load:

db:

Load

     ID,

     Row,

     if(isnull(customer), peek('customer', - 1), customer) as customer,

     .....

- Marcus

Not applicable
Author

AFTER LOADED TABLE IN SCRIPT-

LOAD *

RSIDENT tablename

where Row=1;

***************************

or write this

LOAD *

RSIDENT tablename

where  match(Row,'1');