Book a Demo

Author Topic: DAO.QueryDef [3131] Syntax error in FROM clause.  (Read 6583 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
DAO.QueryDef [3131] Syntax error in FROM clause.
« on: August 14, 2018, 10:30:00 pm »
I'm trying to write a somewhat complicated query, and I don't seem to be able to get EA to execute my query if it does a join with a subquery
I boiled it down to this type of statement:
Code: [Select]
select * from
t_attribute ta
inner join (select a.ID, a.Name from t_attribute a) dataq on dataq.ID = ta.ID
when I execute this in EA I get

DAO.QueryDef [3131]
Syntax error in FROM clause.


The annoying thing is that this executed perfectly fine on the same model when I execute it using SQL Anywhere.

Geert

Does anyone know a workaround for this problem?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DAO.QueryDef [3131] Syntax error in FROM clause.
« Reply #1 on: August 14, 2018, 10:58:30 pm »
I found it.

Seems to be related to Jet 4

My query tools aparently uses Jet 4, while I was using EA without the setting "Use Jet4".

By simply turning the setting on (without changing anything to my .eap file, so the file is still in Jet 3.5 format) it started working.

Next to that I also noticed a huge (8 seconds vs +10 minutes) performance different for one of my complicated queries with lots of joins and unions.

Geert