‎2007 Feb 01 11:21 AM
HI Experts,
I want to read data from 2 tables. There is no relation between the tables. One is user-defined table. I am trying with the inner joins but getting an error. How can I write the Select statement for these two tables?
Thanks & Regards
Rajendra
‎2007 Feb 01 11:23 AM
if there is no link then you have to fetch the data in two select staement in two itab but after that how can you process and what is the requirement i dont know.
regards
shiba dutta
‎2007 Feb 01 11:23 AM
Hi Rajendra Prasad,
If there is no relation between the two tables, it is not possible to join them(Or even if it is possible, it doesn't make any sense ..does it?).
There must be atleast one common field between the two tables, then only you can join them.
Regards,
Ravi
‎2007 Feb 01 11:23 AM
Hi,
look for a third table which is having the common field
if you wish, send the tables i will try to find the relation.
Regards
Shiva
‎2007 Feb 01 11:25 AM
u'll hav to use two select statements for fetching data but da results can b stored in 1 internal table.
‎2007 Feb 01 11:25 AM
Hi Rajendra,
If there is no any common field between the two tables you can not write joins. In that case you will have to select data using two select statements. For more details please let me know the fields in two tables.
‎2007 Feb 01 11:26 AM
Hi,
U can select using joins when there is a common primary key between them, only then the data will be correct and consistent,,.,,... but it depends on the requirement..
As u r saying that thers no relation....
First select one table data into an internal table ..say itab1...
Then use FOR ALL ENTRIES to select data from the other table..
This is a good approach...
CHeers
Rajiv
‎2007 Feb 01 11:27 AM
for fetching data from 2 tables u need to have some sort of field which is similar in both the tables. without this the reporting is incomplete. specify the tables which ur using and if standard table no problem but if it is a custom table, specify even the fields and data elements been used so that the link can be specified.
‎2007 Feb 01 11:50 AM