Book a Demo

Author Topic: What SQL Syntax is allowed in Model Search?  (Read 3469 times)

volenin

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
What SQL Syntax is allowed in Model Search?
« on: December 07, 2012, 04:05:46 pm »
Hi. I wonder what kind of SQL syntax is allowed in the model search? Are you allowed to use 'embedded' SQL to build up complex queries? Cursors? Is it only dependent on the underlying DB you are using to store the model? Thx.

Vlad

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What SQL Syntax is allowed in Model Search?
« Reply #1 on: December 07, 2012, 06:06:48 pm »
Vlad,

First of all it indeed depends on the db you are using. So queries that work on SQL Server might not work on .eap files.

But next to that I've noticed that some things just don't work. I once tried used Common Table Expressions to create a recursive query, and that didn't work. I got some DAO type error complaining about an invalid syntax (although my query worked perfectly when I tried it on the database directly.)

Geert

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: What SQL Syntax is allowed in Model Search?
« Reply #2 on: December 07, 2012, 06:11:49 pm »
Vlad,

You can use Select statements according to the database you use (Access, SQL Server, Oracle,..). Additional you may use the extensions provided by SPARX like:
  • <Search String>
  • #DB=<DBNAME>#
  • #Package#
  • #WC#
  • #Branch#
  • #Author#
  • #UserName#
  • etc.

You can't use cursors.

Kind regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What SQL Syntax is allowed in Model Search?
« Reply #3 on: December 07, 2012, 06:17:45 pm »
Quote
You can't use cursors.

Kind regards,

Helmut

Well, you shouldn't use cursors anyway :P

Geert