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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
soptim_vond
Frequent Visitor

Is it possible to include multiple SQL-Statements in one query (ORACLE)?

Hi folks,

 

usually, working with an oracle database in a standard SQL-editor multiple sql-statements can be entered in one query separated by a semicolon. However, when I try to do that in Power BI, I always get the following error:

ORA-00933: SQL command not properly ended

 

Is there a way to get around this?

 

Separating the two statements is not an option because the order in which they are processed matters and manipulating query order in Power BI is tricky...

 

Thanks in advance,

 

Nico

6 REPLIES 6
Anonymous
Not applicable

Hi soptim_vond,

 

It seems that your query has ended up with the incorrect syntax.

 

Please go through the below URL.

https://www.techonthenet.com/oracle/errors/ora00933.php

 

Regards,

Pradeep

Hi Pradeep,

 

thanks for reply, but the syntax is correct. The statement containing the two substatements separated by a semicolon works fine in a standard SQL-editor. And both substatements work in power bi as well, as long as I put them in seprate queries. Things go wrong as soon as I use a semicolon to separate the two statements.

 

Regards,

 

Nico 

Anonymous
Not applicable

Hi Nico,

 

Can you just send me that query?

 

Because, Power BI will not support ;(semicolon) in SQL Editor. You need to have oracle connector to establish the connection with Oracle DB.

 

If you are using SQL Editor for your Oracle query, then it is wrong.

Or, you can split these two tables and make relations in the data model and then move to further development.

 

Regards,

Pradeep

Anonymous
Not applicable

Thanks a lot for you comment! 

You have saved a lot of days searching for the resolution of my problem!

Hi Pradeep,

 

I´m not sure I get the part about the oracle connector, but here´s my m code from the advanced editor:

 

let

Quelle = Oracle.Database("se.trunk", [Query="
DELETE
FROM PMS_OWNER.VB_LIM_TB_REPORT_TEMPDATA RTDB
WHERE rtdb.RTDB_CLIENT = SYS$UTIL.machine || SYS$UTIL.osuser;
insert into lim_owner.tb_report_tempdata
(rtdb_client, rtdb_item, rtdb_value_number, rtdb_value_string, rtdb_value_datum, rtdb_produkt)
values
(SYS$UTIL.machine || SYS$UTIL.osuser, 'MND', 62, NULL, NULL, 'PMS')
", HierarchicalNavigation=true])

in
Quelle

 

(I know using transactional SQL is not recommended... :))

Regards,

 

Nico

Anonymous
Not applicable

Hi @soptim_vond @Anonymous ,

This is not working for me.

let
Source = Oracle.Database("hyd1225d.india", [Query="select * from APG0_BANK_ACCOUNTS;select * from APG0_CHECKS",HierarchicalNavigation=true])
in
Source

 

It's throwing error like DataSource.Error: Oracle: ORA-00933: SQL command not properly ended.

can you please help me.

Thanks,

Rajyalakshmi.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.