0

How to send multiple queries in single execute statement for example simplified version of my query is (which i am trying to execute using jaydebeapi )

Create temp table tempTable as select * from table1 where x=y;

select * from tempTable ;

UPDATE : I am using Netezza JDBC

Prabha A
  • 33
  • 2
  • 5
  • It depends on whether the JDBC driver supports multi-statement executes. If you have a particular JDBC driver in mind please [edit] your question to specify. – Gord Thompson Jul 27 '18 at 22:04
  • Thanks @Gord , I am using Netezza jdbc . I could not find anything on their website – Prabha A Jul 28 '18 at 04:01
  • Probably not, because the JDBC API is not intended for executing multiple statements together. BTW: I don't understand your example. When would selecting into a temp table and then selecting from that temp table be simpler or better than just selecting directly? – Mark Rotteveel Jul 28 '18 at 12:20
  • @Mark Rotteveel it is a simplified example to illustrate the case .. in my real sql I have multiple temp tables and big final pass to join them all – Prabha A Jul 28 '18 at 13:05
  • Can't you just disable auto-commit and execute them individually? Maybe Netezza has anonymous procedure blocks or something like that? – Mark Rotteveel Jul 28 '18 at 13:07

0 Answers0