Skip to Content
0
Former Member
Jul 23, 2008 at 02:12 AM

Join statment is not working

36 Views

Hello Experts,

I am trying to write a below code where i will be using JOIN statment to select data from 2 table faglflexas and cepct.These two tables have only one field in common(prctr).I would also be getting the value of prctr from the user on selection screen.

But the code syntax is not allowing me to prctr in both the places.

SELECT faglflexapoper faglflexaryear faglflexaprctr cepctktext " FROM faglflexa

INTO CORRESPONDING FIELDS OF TABLE gi_prctr

FROM cepct JOIN faglflexa ON cepctprctr = faglflexaprctr

WHERE poper IN s_period

AND ryear EQ p_fyear.

AND prctr in s_prctr.

I am getting error in last line of AND prctr in s_prctr. asking that I prctr is defined in two places in the select query.

please help.

points will be rewarded definately.