0

Does select * into table query work in Redshift? I get the following error when I try it:

JDBC Driver]com.amazon.dsi.dataengine.impl.DSISimpleRowCountResult cannot be cast to com.amazon.dsi.dataengine.interfaces.IResultSet [SQL State=HY000] 1 statement failed.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Churku
  • 27
  • 1
  • 4
  • Yes. Since you are getting a JDBC error I suspect that the issues is elsewhere. Can you provide more information? Statement, connection topology, etc. – Bill Weiner Nov 20 '20 at 18:29
  • Its a simple query - select * into table1 from table2. I'm using SQL Workbench to connect to Amazon Redshift. – Churku Nov 20 '20 at 21:17
  • Does a normal `SELECT` statement work for you? It might be that the driver is confused that the query didn't return rows, since they were inserted into another table. Are you using the Redshift drivers? Have you tried running the command in the SQL Editor in the Redshift console? – John Rotenstein Nov 20 '20 at 22:34
  • Yes, select statement works fine. This is the driver I'm using - RedshiftJDBC4-1.2.7.1003. I just verified that the same query is working in some other machine, fails in my machine. – Churku Nov 23 '20 at 16:36

1 Answers1

0

Select * into in Redshift very well work. Please refer the URL

The error you have mentioned is because of the Driver issue in the sqlworkbench. Please refer the url to set the driver. Test whether your select * from table is working fine

BigData-Guru
  • 1,161
  • 1
  • 15
  • 20