Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I have a product table and order table.
table_1_map:
mapping load
product_id , order_id
resident order;
now i need to do applymap in product table to get the order_id also in the product table..
what i am doing is not giving me the right results
ApplyMap('table_1_map', product_id, 'order_id') as order_id1
please help me with what i am doing wrong
Thanks & Regards,
Jaya
Hi,
Try this:
ApplyMap('table_1_map', product_id) as order_id1
HTH
Sushil
your syntax looks ok ...
ApplyMap('table_1_map', product_id, order_id) as order_id1
3rd parameter is a optional one , you could specify a column or a default value ..
can you share the sample data and results..and whats going wrong
Hello,
Your line of code looks okay. Be careful in the join you create to add this field to the product table, remember to use a DISTINCT clause. Should be something like:
Left Join(Products)
LOAD
DISTINCT
product_id,
ApplyMap('table_1_map', product_id, 'order_id') as order_id1
Resident Products;
Gook luck
Andrew
Hi,
Looks OK at first glance.
I have attached qvw file with a test, using your column names.
Maybe you can share your qvw file with us as well, so we can investigate further.
Regards,
Filip
Hi,
Can you send me sample qvw file?