Book a Demo

Author Topic: Model Search - #BRANCH# bug  (Read 5063 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Model Search - #BRANCH# bug
« on: May 26, 2016, 05:06:20 pm »
SELECT O.ea_guid AS CLASSGUID, O.Name, O.StereoType, O.Status, O.Author, O.ModifiedDate, O.CreatedDate
FROM (t_object AS O INNER JOIN t_package AS P ON O.Package_ID = P.Package_ID)
WHERE (P.Package_ID=#Package#) AND (O.Object_Type<>'Text' AND O.Object_Type<>'Package')
ORDER BY O.Name

Finds the items in a package,. 

If I replace #Package# with #Branch# (and there is more than one level of package), I get an syntax error error at ','.  I suspect the macro conversion is failing and the comma separated list is malformed.

Reported,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Model Search - #BRANCH# bug
« Reply #1 on: May 26, 2016, 05:12:37 pm »
Use have you tried '#Branch' as its a comma separated list ?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Search - #BRANCH# bug
« Reply #2 on: May 26, 2016, 06:38:44 pm »
The syntax for a comma separated list is WHIERE (P.Package_ID IN (#Branch#)) AND ...

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Model Search - #BRANCH# bug
« Reply #3 on: May 27, 2016, 09:48:53 am »
The syntax for a comma separated list is WHIERE (P.Package_ID IN (#Branch#)) AND ...

q.
When all else fails, get someone else (q) to RTFM...   :-[

However, when I set the correct syntax I get a peculiar error

"Error in date in query expression 'Package_ID IN (#BRANCH#)'"

It turns out the name of the Macro is CASE SENSITIVE!  Exactly as  shown in the Help: "Branch"

Paolo
« Last Edit: May 29, 2016, 10:47:54 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Search - #BRANCH# bug
« Reply #4 on: May 27, 2016, 06:15:09 pm »
I guess this case sensitivity should be reported as bug. (Has the "capitalized AS"-bug ever been reported?)

q.