Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
UsePowerBI
Post Prodigy
Post Prodigy

Problema con la instrucción SQL

Hola

Utilizo la siguiente instrucción SQL, pero solo muestra los valores de Table4 y todos los valores de resto de los campos de las otras tablas son nulos.

SELECT * FROM Table1
LEFT JOIN Table2
ON Table1.Col1 = Table2.Col2
LEFT JOIN Table3
ON Table2.Col4 = Table3.Col5
RIGHT JOIN Table4
ON Table2.Col6 = Table4.Col7

¿Alguna idea?

¡Gracias!

5 REPLIES 5
Pragati11
Super User
Super User

Hola @UsePowerBI ,

No estoy seguro si entiendo su problema correctamente.

¿Está utilizando esta consulta sql en Power BI o desea replicar una consulta similar en Power BI?

Por favor, agregue detalles: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

hola @Pragati11

Estoy colocando esta instrucción SQL en Power BI, pero no produce el resultado que debería. La declaración podría ser incorrecta, ¿alguna pista?

Gracias

Hola @UsePowerBI ,

Intente reemplazar la sección resaltada como se muestra a continuación con Table3.Col5:

Pragati11_0-1602515085286.png

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hola @Pragati11

Gracias, pero Table4.Col7 sólo se puede unir con Table2.Col6. El cuadro 3.Col5 no es pertinente para el cuadro 4.Col7.

¿Alguna otra idea?

Hola @UsePowerBI ,

Es muy difícil de analizar sin mirar los datos y simplemente imaginando.

¿Esta instrucción es correcta en SQL?

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.