Large OBDC Oracle SQL queries in excel cell
Quote from Randee on April 28, 2026, 10:37 amI am using Reportworq to publish data from our Oracle database. The query seems to be too large and no data is produced. I would like to spread the query over two cells, but cannot get it too work. See attached. Can you provide an example.
thx Randee
I am using Reportworq to publish data from our Oracle database. The query seems to be too large and no data is produced. I would like to spread the query over two cells, but cannot get it too work. See attached. Can you provide an example.
thx Randee
Uploaded files:
- You need to login to have access to uploads.
Quote from Karen Hewitt on April 28, 2026, 11:02 amHi Randee! Thanks for your question. You can definitely split up the SQL into separate excel cells then concatenate together into another cell. Looking at your file I see a few things.
- In the SQL it looks like INVENTORY_ITEM_STATUS_CODE doesn't have the defined table source in front of it in the select or where statement would that come from table t, c, or h in your query? Same for partno in the select statement and code_type in the where statement which table are these from?
- When you concatenate the values since the value in B4 doesn't start with an = the " it is starting with is getting added into the SQL string which can cause an error
I'm attaching a revised example where I added t. in front of partno and h. in from of INVENTORY_ITEM_STATUS_CODE and c. in front of code_type, please adjust these to the correct tables as I was taking a guess. Then you can see in cell A2 the concatenated formula for the two separate SQL statements in B2 and C2 and cell D2 is just a pasted values replication of what is in A2 that you can paste into your SQL query tool directly to ensure the data pulls back as expected and gives you what you need in the Excel file. If that checks out than the SQL syntax is good to go. If you don't have a way to test the SQL before running it through Reportworq no worries, we can modify as needed and try again.
Cell A3 has the RW SQL formula in it.
Here is also a link to the documentation for RWSQL formula. https://docs.reportworq.com/docs/excel-functions-relational-data-sources/#rwsql
Let me know if that helps! If you run into further issues and want to schedule some time to review in person here is a link to my calendar as well. https://meetings-na2.hubspot.com/karen-hewitt
Hi Randee! Thanks for your question. You can definitely split up the SQL into separate excel cells then concatenate together into another cell. Looking at your file I see a few things.
- In the SQL it looks like INVENTORY_ITEM_STATUS_CODE doesn't have the defined table source in front of it in the select or where statement would that come from table t, c, or h in your query? Same for partno in the select statement and code_type in the where statement which table are these from?
- When you concatenate the values since the value in B4 doesn't start with an = the " it is starting with is getting added into the SQL string which can cause an error
I'm attaching a revised example where I added t. in front of partno and h. in from of INVENTORY_ITEM_STATUS_CODE and c. in front of code_type, please adjust these to the correct tables as I was taking a guess. Then you can see in cell A2 the concatenated formula for the two separate SQL statements in B2 and C2 and cell D2 is just a pasted values replication of what is in A2 that you can paste into your SQL query tool directly to ensure the data pulls back as expected and gives you what you need in the Excel file. If that checks out than the SQL syntax is good to go. If you don't have a way to test the SQL before running it through Reportworq no worries, we can modify as needed and try again.
Cell A3 has the RW SQL formula in it.
Here is also a link to the documentation for RWSQL formula. https://docs.reportworq.com/docs/excel-functions-relational-data-sources/#rwsql
Let me know if that helps! If you run into further issues and want to schedule some time to review in person here is a link to my calendar as well. https://meetings-na2.hubspot.com/karen-hewitt
Uploaded files:- You need to login to have access to uploads.