Menu

Does ucanaccess accept SELECT table.* INTO

Help
2020-03-26
2020-04-03
  • Steven Cooke

    Steven Cooke - 2020-03-26

    My code looks like this:

    PreparedStatement ps = null;
    
    sql = "SELECT tblRequestsFromDWH.* INTO tblTechnique FROM tblRequestsFromDWH WHERE tblRequestsFromDWH.finalBethesda Is Null AND tblRequestsFromDWH.smearTechnique Is Not Null";
    
    ps = module.getSupportConnection().prepareStatement(sql);
    ps.execute();
    

    However when I run this I get this exception:

    net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.4 unexpected token: INTO required: FROM
    However I can run this from within MS Access just fine

     
  • Steven Cooke

    Steven Cooke - 2020-03-27

    looks like a syntax error

    sql = "INSERT INTO table (column1, column2) + " SELECT table2.column1, table2.column2 FROM table.2" + " WHERE some condition exists";

     
  • Gord Thompson

    Gord Thompson - 2020-04-03

    Answered on Stack Overflow here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.