Book a Demo

Author Topic: Search for Packages with Baselines  (Read 5170 times)

Dorian Workman

  • EA User
  • **
  • Posts: 194
  • Karma: +0/-0
    • View Profile
Search for Packages with Baselines
« on: January 31, 2009, 08:36:29 am »
I'm trying to find a way to easily identify all packages in a branch that have baselines. I've already ascertained there's no icon that displays in the project browser, so my next thought was that perhaps this could be accomplished using Model Search.

Anyone have any ideas on this?  I was thinking maybe a Custom SQL Query might work?  I assume this would be a search on the t_package table, but I have no idea what to search for.  Anyone?  I am not an SQL expert at all...

Thanks.
<a href="http://www.linkedin.com/in/dorianworkman" ><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.gif" width="80" height="15" border="0" alt="View Dorian Workman

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Search for Packages with Baselines
« Reply #1 on: February 02, 2009, 04:34:54 pm »
Try this Custom SQL Search:

SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, t_document.DocType
FROM t_object INNER JOIN t_document ON t_object.ea_guid = t_document.ElementID
WHERE (t_object.Object_Type='Package' AND t_document.DocType="Baseline");
Cheers.
« Last Edit: February 02, 2009, 04:46:49 pm by Dermot »

Dorian Workman

  • EA User
  • **
  • Posts: 194
  • Karma: +0/-0
    • View Profile
Re: Search for Packages with Baselines
« Reply #2 on: February 03, 2009, 05:28:22 am »
This worked perfectly thanks Dermot!
<a href="http://www.linkedin.com/in/dorianworkman" ><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.gif" width="80" height="15" border="0" alt="View Dorian Workman

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Search for Packages with Baselines
« Reply #3 on: February 04, 2009, 09:07:18 pm »
Quote
Try this Custom SQL Search:

SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name, t_document.DocType
FROM t_object INNER JOIN t_document ON t_object.ea_guid = t_document.ElementID
WHERE (t_object.Object_Type='Package' AND t_document.DocType="Baseline");
Cheers.

Interesting because here it leads to an error:
invalid column name:"Baseline"

Werlang

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Search for Packages with Baselines
« Reply #4 on: February 05, 2009, 02:33:25 am »
Hi, Oliver!

Currently your server must have Quoted Identifiers turned on, this way double quotes are treated as identifiers. Or, you're not using SQL Server. (I don't know what other DBMSs EA supports.)

Just replace double quotes with single quotes so you can run this query.  :)

Regards,

Andre
Keep on rockin' in the free world

Dorian Workman

  • EA User
  • **
  • Posts: 194
  • Karma: +0/-0
    • View Profile
Re: Search for Packages with Baselines
« Reply #5 on: February 05, 2009, 04:57:44 am »
I am using an EAP file, so that might explain why it works fine for me.
<a href="http://www.linkedin.com/in/dorianworkman" ><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.gif" width="80" height="15" border="0" alt="View Dorian Workman

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Search for Packages with Baselines
« Reply #6 on: February 05, 2009, 06:54:52 pm »
Quote
Just replace double quotes with single quotes so you can run this query.  :)

Ah, right, that was it. Thanks a lot.

Oliver

Dorian Workman

  • EA User
  • **
  • Posts: 194
  • Karma: +0/-0
    • View Profile
Re: Search for Packages with Baselines
« Reply #7 on: February 14, 2009, 11:05:24 am »
By default this searches the entire model.  Is there a way to restrict this to the 'Current Tree Selection'?

Thanks!
« Last Edit: February 14, 2009, 11:09:23 am by dworkman »
<a href="http://www.linkedin.com/in/dorianworkman" ><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.gif" width="80" height="15" border="0" alt="View Dorian Workman

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Search for Packages with Baselines
« Reply #8 on: February 16, 2009, 08:17:58 am »
No, custom sql searches can't be restricted to the current branch.

Dorian Workman

  • EA User
  • **
  • Posts: 194
  • Karma: +0/-0
    • View Profile
Re: Search for Packages with Baselines
« Reply #9 on: February 16, 2009, 09:53:54 am »
Thanks anyway Simon.
<a href="http://www.linkedin.com/in/dorianworkman" ><img src="http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.gif" width="80" height="15" border="0" alt="View Dorian Workman