‎2007 Jan 31 10:23 AM
hello all,
i need to select differant fields from differant tables when i select common fields from both the tables, is it necessary that the common field need to be a primary key in both tables.
thanks in advance
seenu
‎2007 Jan 31 10:25 AM
HI,
No its not required that the common field be part of the primary key in both tables only thing is you need to prefix the table name if the field names are same. But if you are using a INNER JOIN then there is no need to select both fields since you know the content of both fields will be same if JOIN is ON these fileds as well.
Regards,
Sesh
Message was edited by:
Seshatalpasai Madala
‎2007 Jan 31 10:25 AM
HI,
No its not required that the common field be part of the primary key in both tables only thing is you need to prefix the table name if the field names are same. But if you are using a INNER JOIN then there is no need to select both fields since you know the content of both fields will be same if JOIN is ON these fileds as well.
Regards,
Sesh
Message was edited by:
Seshatalpasai Madala
‎2007 Jan 31 10:25 AM
HI,
There is no necessity to the field will be the primary key field in that table.
If the particular field is primary key means u can take the data in very secured way that's all.
Thanks,
Shankar
‎2007 Jan 31 10:28 AM
Hi,
You need to check the field name in eeach table the name of the field may be change in table you need to find out the values
or create sap query to check the common fields
or create a view for the same
Regards
Shiva
‎2007 Jan 31 11:49 AM
Hi,
There is no need that the fields are primary keys . U can select the fileds from different tables Using INNER JOIN or FOR ALL ENTRIES.
Regards,
Shafi