‎2009 Nov 02 11:37 AM
Hi,
I'm joining two tables with SQL, the problem I want to write * from writing all the fields
what I do like this
SELECT Z* T* FROM table1 AS Z INNER JOIN Tbale2 AS T ON Zx = Ty
how do I write this ?? without getting error for Z* and T*
Thx
‎2009 Nov 02 11:49 AM
Hi,
If you want to use all fields of both tables use it as follows:-
TYPES:BEGIN OF ty_mat,
include TYPE mara.
INCLUDE TYPE makt.
types:END OF ty_mat.
data:t_mat type standard table of ty_mat.
then use select * from table1 and table 2 as your doing now.
Alternatively u can use this:-
SELECT * FROM X INTO TABLE T_TABLE1.
SELECT * FROM Y INTO TABLE T_TABLE2
FOR ALL ENTRIES IN T_tABLE1
WHERE p = T_TABLE1-Q.
Edited by: Subhashini K on Nov 2, 2009 5:25 PM
‎2009 Nov 02 11:45 AM
‎2009 Nov 02 11:49 AM
Hi,
If you want to use all fields of both tables use it as follows:-
TYPES:BEGIN OF ty_mat,
include TYPE mara.
INCLUDE TYPE makt.
types:END OF ty_mat.
data:t_mat type standard table of ty_mat.
then use select * from table1 and table 2 as your doing now.
Alternatively u can use this:-
SELECT * FROM X INTO TABLE T_TABLE1.
SELECT * FROM Y INTO TABLE T_TABLE2
FOR ALL ENTRIES IN T_tABLE1
WHERE p = T_TABLE1-Q.
Edited by: Subhashini K on Nov 2, 2009 5:25 PM