FoxPro/Visual FoxPro - AYUDA PARA COMBINAR TABLAS

 
Vista:

AYUDA PARA COMBINAR TABLAS

Publicado por ALBERTO (10 intervenciones) el 15/09/2006 21:53:03
HOLA A TODOS LOS TESOS! DE LA PROGRAMACIONBUENO YO LLEVO UN AÑITO PROGRAMANDO EN FOXPRO Y .NET BUENO AHORA ESTOY APRENDIENDO A MANEJAR SQL Y NECESITO EN UNA INSTRUCCION COMBINAR DOS CAMPOS DE DOS TABLAS DISTINTAS QUE TIENEN EL MISMO NOMBRE DE LOS CAMPOS EN UNA SOLA
ES CODIGO Y NOMBRE
OSEA QUE ME QUEDE ASI

COD NOMBRE
DATOS TABLA UNO DATOS TABLA UNO
DATOS TABLA DOS DATOS TABLA DOS

O COMO SEA POR FAVOR ESTOY MUY BARADO
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:AYUDA PARA COMBINAR TABLAS

Publicado por Plinio (7841 intervenciones) el 15/09/2006 21:58:05
Cheqeua en la ayuda en SELECT -sql la clausula UNION
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:AYUDA PARA COMBINAR TABLAS

Publicado por sergio (737 intervenciones) el 15/09/2006 21:58:20
Si es en sql de fox
select tabla1.*,tabla2.* from tabla1,tabla2 where tabla1.campo1=tabla2.campo1

tabla1.* te muetsra todos los campos de la tabla 1 igualmente para tabla2.* si queres mostrar solo algunos campos, pone los nombres de los campos con el alias para que no te de ambiguedad
AMbiguedad = campos de igual nombre de distintas tablas, por eso tenes que poner el alias. para poder identificarlos

otra form

select tabla1.*.tabla2.* from tabla1 left outer join tabla2 on tabla1.campo1=tabla2.campo1
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar