cancel
Showing results for 
Search instead for 
Did you mean: 

Creating and using temp SQL table

mckenzma
Ninja
Ninja

I am trying to create a temporary SQL table and then query from that temp table. This is due to project restrictions that I am currently facing. We are trying a temp table and then querying the temp table due to performance bottle-necking on the SQL database.

Is it possible to do this using apoc.load.jdbc? I have tried running something like:

CALL apoc.load.jdbc("connection string","
/* create temp table */
select top 10 * 
into #temp_table
from table

/* query temp table */
select * from #temp_table
") yield row
RETURN row

but I get an error message that says "Neo.ClientError.ProcedureCalFailed: Failed to invoke procedure 'apoc.load.jdbc' : Caused by: java.sql.SQLException: J20R2: No result set for this query" which seems to indicate that the creating a temp table is the issue since it doesn't generate an output.

Is there a way to create a temp table and generate an output? I'm assuming not, but thought I would ask.

Neo4j Version: 3.5.12
Apoc Version: 3.5.0.6
SQL: Sybase

This obviously not the ideal way of handling things and will likely change in the future. I am just curious if there is a temporary solution.

1 REPLY 1

mckenzma
Ninja
Ninja

I am circling back on this to see if anyone might have an idea if this is possible.