2007 Jul 26 5:26 AM
how can i fetch data from 3 tables with <b>a single select statement without using joins</b>
2007 Jul 26 5:45 AM
hi,
<i>Use Database View</i> (SE11)
Database views are implement an inner join, that is,
only records of the primary table (selected via the join operation)
for which the corresponding records of the secondary tables also exist are fetched.
Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields.
In the other types of view, they must be taken from existing foreign keys.
That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
<u>
Creating Database View:</u>
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Regards
Reshma
hi,
<i>Use Database View</i> (SE11)
Database views are implement an inner join, that is,
only records of the primary table (selected via the join operation)
for which the corresponding records of the secondary tables also exist are fetched.
Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields.
In the other types of view, they must be taken from existing foreign keys.
That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
<u>
Creating Database View:</u>
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Regards
Reshma
2007 Jul 26 5:28 AM
create a datbase view in se11 with those three tables and now select the data by using single select statement from that view.
regards
shiba dutta
2007 Jul 26 5:28 AM
hi Samuel,
Create a database <b>view </b>with all the three tables via SE11 and use that view in your select statement
Regards,
Santosh
2007 Jul 26 5:45 AM
hi,
<i>Use Database View</i> (SE11)
Database views are implement an inner join, that is,
only records of the primary table (selected via the join operation)
for which the corresponding records of the secondary tables also exist are fetched.
Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields.
In the other types of view, they must be taken from existing foreign keys.
That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
<u>
Creating Database View:</u>
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Regards
Reshma
2007 Jul 26 6:04 AM
bu the view also contains joins is there no other way to do it
2007 Jul 26 6:05 AM
hi Samuel,
I guess this is the only way as per your requirement .....
Regards,
Santosh
2007 Jul 26 6:05 AM
Hi samuel,
I already answered your query
No there is no other way to get data from 3 tables in one select statement.
Regards,
Atish
2007 Jul 26 6:07 AM
2007 Jul 26 5:47 AM
Hi Samuel
Create a database view(SE11) and select those particular fields from the 3 tables and use select statement from the view
if it is helpful please reward points,
Regards,
Azhar
2007 Jul 26 5:54 AM
hi,
u can use view for it for even for all entries statement.
if helpful reward some points.
with regards,
Suresh Aluri.
2007 Jul 26 6:02 AM
Hi Samuel,
There is a just workaround for it and it is also internally a JOIN :).
You need to create a DB view on there 3 tables.
Regards,
Atish
2007 Jul 26 6:09 AM
samuel
u create a view and use it as a single table
if ur view is view1
then use
select * from view1.
i think they is no other way for ur requirement
Regards,
Azhar
2007 Jul 26 6:12 AM
<b>Hi Samuel,
The only way is to create a projection view of 3 database tables and slect records from that VIEW.
regards
Debjani</b>
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |