SQL Developer not exporting as .xlxs or .csv when using WITH statement

Viewed 81

When I create a temp table using a WITH statement and run the query, I get the desired output, however, when I try and export as .xlxs or .csv in SQL Developer, it exports as a 0KB file. Why is this? Is there a workaround this? The reason why I'm using WITH is because IN maxes out at 1000 and I want to search for specific IDs. I also don't have permissions to create tables.

with base as (
    select 4684 spid from dual union
    select 112477 spid from dual union
    ...
    select 6547 spid from dual
)
select *
from base
left join table on base.spid = table.supplypointid
where table.propertykey='MPCORE' and table.dateend is null 
1 Answers

I don't think this has anything to do with your WITH clause.

I think you're running into an old SQLDev bug - do you have any DATE columns in your table that are NULL?

Here's a working scenario -

with base as (
    select 101 spid from dual union
    select 102 spid from dual union
    select 201 spid from dual
)
select *
from base
left join employees on base.spid = employees.employee_id

enter image description here

Then open the file...

enter image description here

So my official answer to your question is..provide actual scenario with the data and/or make sure you're on version 21.2.1 (latest) of SQL Developer.

Related