Book a Demo

Author Topic: Search Query does not run from RTF Generator??????  (Read 3234 times)

pocketom

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Search Query does not run from RTF Generator??????
« on: October 19, 2010, 02:47:04 am »

This search query (MSSQL 2008 project DB) runs without errors and delivering the desired result from the search builder:

Code: [Select]
SELECT
tpack.ea_guid AS CLASSGUID,
'Package' AS CLASSTYPE,
tpack.Package_ID,
tpack.Name
FROM
t_package tpack
WHERE tpack.Parent_ID IN
(
      SELECT
      tpack.Package_ID
      FROM
      t_object tobj
      JOIN
      t_objectproperties tobjprop on tobj.Object_ID = tobjprop.Object_ID
      JOIN
      t_package tpack on tobj.PDATA1 = tpack.Package_ID
      WHERE
      tobjprop.Property = 'ProjectCode' AND
      tobjprop.Value = 'EGSP' AND
      (
            tpack.PackageFlags NOT LIKE '%RTF=F;%' OR
            tpack.PackageFlags IS NULL
      ) AND
      tobj.Name = '<Search Term>'
)
ORDER BY tpack.TPos

When I set it for an RTF model document as SearchName it throws an SQL error

Invalid column name 'Object_ID'

WTF is going on ??? Wasted the whole afternoon now!!!  :-[

pocketom

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: Search Query does not run from RTF Generator??
« Reply #1 on: October 19, 2010, 08:22:50 am »
Figured it out, the query shown in this post is working:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1287436116

Obviosly ea_guid is not ea_guid (pass results from table t_object only???)

Please close this thread.
« Last Edit: October 19, 2010, 08:26:16 am by pocketom »