Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31082

DataSource.Error: Oracle: ORA-00911: invalid character

$
0
0

I am looking for help on why the following SQL does not work in Power BI.

 

The SQL I have works fine when I test it in TOAD but when I try it in Power BI I get the following error.

DataSource.Error: Oracle: ORA-00911: invalid character
Details:
DataSourceKind=Oracle
DataSourcePath=d7ip_adg
Message=ORA-00911: invalid character
ErrorCode=-2147467259

 

Here is the SQL.

 

WITHq as(select        table1.name as label,        count(table1.id)as count_id,
        row_number()over(orderby count(table1.id)desc)as rn    from table1   where table1.name like'D%'groupby table1.name)selectcasewhen rn <=9then labelelse'Other'end label,    sum(count_id) count_idfrom qgroupbycasewhen rn <=9then labelelse'Other'end;

IF I strip out the last part and run it like this it will return data but not group it up like I need.

 

select        table1.name as label,        count(table1.id)as count_id,
        row_number()over(orderby count(table1.id)desc)as rn    from table1   where table1.name like'D%'groupby table1.name

 


Viewing all articles
Browse latest Browse all 31082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>