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.
Hi All,
I'm having an issue with a SQL statement, it will only return the column names and no data, but I have ran the query in SAP and the data is there . Not sure why the results are not coming up.
Here it's the query:
Select * FROM database.table WHERE 'Project' in ('xxx1',
'xx2',
'xx3')
And the result that I'm getting it's all the column names of the table with no data in the rows. Does anyone know why that is happening?
Appreciate your help!
Thanks,
Mariana
Solved! Go to Solution.
Hi @Anonymous thanks again...yes it's similar indeed, but with this other database it worked with the "":
Select * FROM "database"."table" WHERE "Project" IN ('xxx1',
'xx2',
'xx3'
)
I will just try all the posibilities next time I have the same issue...thanks
I think that your single quotes around Project are the issue:
https://www.w3schools.com/Sql/sql_in.asp
Select * FROM database.table WHERE Project in ('xxx1', 'xx2', 'xx3')
It is the same as you put there a minutes ago.. You can't put '' in column names in SQL querys.
Hi @Anonymous thanks again...yes it's similar indeed, but with this other database it worked with the "":
Select * FROM "database"."table" WHERE "Project" IN ('xxx1',
'xx2',
'xx3'
)
I will just try all the posibilities next time I have the same issue...thanks
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |