Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding Joins

Former Member
0 Likes
925

Hi All,

Please check this code.

select afko~aufnr

afvc~vornr

afvc~steus

afvv~arbei

afvc~anzzl

afvv~ismnw

afvv~ofmnw

crhd~arbpl

afvv~fssbd

afvv~fssbz

afvv~fseld

afvv~fselz

mhio~abnum

mhis~nplda

into corresponding fileds of table t_opr

from afvv join afvc on (afvcaufpl = afvvaufpl and afvcaplzl = afvvaplzl)

join crhd on afvcarbid = crhdobjid

join afko on afkoaufpl = afvcaufpl

join mhio on mhioaufnr = afkoaufnr

join mhis on ( mhisabnum = mhioabnum and mhiswarpl = mhiowarpl ).

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
804

Hi

Dont use joins instead use for all entries as joins will raise performance issues.

Regards

Haritha.

Hi All,

Please check this code.

select afko~aufnr

afvc~vornr

afvc~steus

afvv~arbei

afvc~anzzl

afvv~ismnw

afvv~ofmnw

crhd~arbpl

afvv~fssbd

afvv~fssbz

afvv~fseld

afvv~fselz

mhio~abnum

mhis~nplda

into corresponding fileds of table t_opr

from afvv join afvc on (afvcaufpl = afvvaufpl and afvcaplzl = afvvaplzl)

join crhd on afvcarbid = crhdobjid

join afko on afkoaufpl = afvcaufpl

join mhio on mhioaufnr = afkoaufnr

join mhis on ( mhisabnum = mhioabnum and mhiswarpl = mhiowarpl ).

4 REPLIES 4
Read only

Former Member
0 Likes
804

hi,

Avoid using join statement use FOR ALL ENTRIES instead of joins

In the given code specify some of the related conditions in where condition too..

select afko~aufnr

afvc~vornr

afvc~steus

afvv~arbei

afvc~anzzl

afvv~ismnw

afvv~ofmnw

crhd~arbpl

afvv~fssbd

afvv~fssbz

afvv~fseld

afvv~fselz

mhio~abnum

mhis~nplda

into corresponding fileds of table t_opr

from afvv join afvc on (afvcaufpl = afvvaufpl and afvcaplzl = afvvaplzl)

join crhd on afvcarbid = crhdobjid

join afko on afkoaufpl = afvcaufpl

join mhio on mhioaufnr = afkoaufnr

join mhis on ( mhisabnum = mhioabnum and mhiswarpl = mhiowarpl )

<b>where <Conditions>.</b>

Regards,

Santosh

Read only

Former Member
0 Likes
805

Hi

Dont use joins instead use for all entries as joins will raise performance issues.

Regards

Haritha.

Read only

Former Member
0 Likes
804

Thanks for your replay.

i know that whenever i use for all statement instead of join.

but i cant change join statement.

is this query is correct or not......just you can find that query

Thanks in advance.

Read only

Former Member
0 Likes
804

this is syntactically correct but u wont get anyvalue in the table.

Specify ur where condition to fetch the values from table.

select afko~aufnr

afvc~vornr

afvc~steus

afvv~arbei

afvc~anzzl

afvv~ismnw

afvv~ofmnw

crhd~arbpl

afvv~fssbd

afvv~fssbz

afvv~fseld

afvv~fselz

mhio~abnum

mhis~nplda

into corresponding fields of table t_opr

from afvv join afvc on afvcaufpl = afvvaufpl and afvcaplzl = afvvaplzl

join crhd on afvcarbid = crhdobjid

join afko on afkoaufpl = afvcaufpl

join mhio on mhioaufnr = afkoaufnr

join mhis on mhisabnum = mhioabnum and mhiswarpl = mhiowarpl.