#1
|
|||
|
|||
Optimizar Select
Miren en el trabajo me pidieron optimizar unos select reemplazando los for all entries por unos inner join. Tengo dudas en como utilizar el inner join y que datos poner en el select en vez de *. El código es el siguiente:
SELECT * INTO CORRESPONDING FIELDS OF TABLE t_ekko FROM ekko WHERE ebeln IN ebeln AND kdatb IN s_kdatb AND kdate IN s_kdate . SELECT * INTO CORRESPONDING FIELDS OF TABLE t_ekpo FROM ekpo FOR ALL ENTRIES IN t_ekko WHERE ebeln EQ t_ekko-ebeln . select * into corresponding fields of table i_eban from eban for all entries in t_ekpo where banfn eq t_ekpo-banfn and bnfpo eq t_ekpo-bnfpo and banfn in banfn and werks in werks and bsart in bsart and badat in badat and ekgrp in ekgrp and ebeln in ebeln and bedat in bedat and konnr in konnr. Espero me puedan ayudar |
#2
|
||||
|
||||
Ejemplo!
Los inner join se hacen con otras tablas de la base de datos... El FOR ALL ENTRIES creo q se usa solo con una tabla interna.! Esa creo es una diferencia.!
Te coloco un ejemplo de Inner Join: form find_data.Saludos!
__________________
Atte. Marcos Carrasco... |
#3
|
|||
|
|||
Gracias
Gracias por la ayuda voy a revisar
|
Herramientas | Buscar en Tema |
Desplegado | |
|
|