Forum Discussion
HamidBee
4 years agoPower Participant
SQL Syntax incorrect when using DISTINCT -PowerBI Report Builder
I am using Power BI Report Builder. I am querying data being held in SSMS. My SQL syntax seems to be incorrect when I use DISTINCT:
SELECT
[Sheet1$].ID
,[Sheet1$].Player
,DISTINCT([Sheet1$].Nationality)
FROM
[Sheet1$]Any ideas as to why this is?
I realised that DISTINCT should come directly after the SELECT statement inorder for it to work.
SELECT DISTINCT [Sheet1$].Nationality, [Sheet1$].ID, [Sheet1$].Player FROM [Sheet1$]
1 Reply
- HamidBeePower Participant
I realised that DISTINCT should come directly after the SELECT statement inorder for it to work.
SELECT DISTINCT [Sheet1$].Nationality, [Sheet1$].ID, [Sheet1$].Player FROM [Sheet1$]