Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
can i use the fields of another table in my script.
HI DG,
sorry but you need to expand a little on your requirement here!!
Andy
suppose there is x field in one table i want to use this x field in another table condition in my script bth the tables are joined wth a primary key
how to bring the field of one table to another table
Hi,
You can use apply map, to bring the desired field from another table and join both the tables using the key.
Hope that helps.
http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/
Regards,
Saniya.
but in this mapping table should be having one column only?
but my table has many fields,and the two tables are joined via one key but still am unable to use former field in latter ,its saying field not found
You can resident load primary key column and the field you want into a mapping table and use apply map.
Or
join both the tables!! Then you have all the fields. IF you doesn't need other fields, you can drop other fields.
Whats you actual requirement ? can you explain with an example so that it will help us understand better ?
if you have a primary and want to mapp only one column then go for applymap ...but mapping table should not have the duplicate keys
or join the tables
It's not possible to use fields from other table without Join or Applymap.
aircode:
TableA:
LOAD Key, A, B, C FROM .....;
TableB:
LOAD Key, D, E, F FROM .....;
JoinD:
LEFT JOIN (TableA) LOAD Key, D RESIDENT TableB;
DROP FIELD D FROM TableB;
HTH Peter