Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Table to Query Embedded SQL Code within Console Reports and Filters

Created: 16 Aug 2013 | 2 comments

So I've made a few reports and filters that and reused SQL statements when gathering simliar data.  Anyway, I ran across a table join that was mostly correct but will invalid results for certain data sets.  I know how to correct the join, that's not the problem.  Does anyone know what SQL table stores the embedded SQL code used to run reports and filters?  I'd like to track down the other reports and filters where I used a the same table join.

Operating Systems:

Comments 2 CommentsJump to latest comment

PeeGee's picture

I am not aware of a table which would hold them for all filters and reports.

To modify an existing out of the box filter, you can export it, modify the code and import again. Usually that should overwrite the existing one, as long as the ID stays the same.

Otherwise you can of course clone any report or filter, fix the code in the clone and then use the clone instead of the original.

SaschaH's picture

Its saved in xml representation in the item table in the state value.

Simple raw SQL Filter looks like this.

<item>    
<isManualUpdate>false</isManualUpdate>    
<manufacturer />    
<dataSource typeGuid="b29ba3f7-cc80-4988-a341-d8471b05ea1d">      
<configuration>        
<base>          
<parameters />        
</base>        
<query><![CDATA[SELECT     [vri1_Computer].[Guid],     [vri1_Computer].[Name]  FROM     [vComputer] AS [vri1_Computer]  WHERE  ([vri1_Computer].[OS Name] LIKE '%Windows 7%'  AND [vri1_Computer].[Name] LIKE '%'  AND [vri1_Computer].[IsManaged] =  0)]]>
</query>      
</configuration>    
</dataSource>  
</item>
 
So query for all item with your table join just
select * from item where item.state like '%YOUR TABLE JOIN%'

Bechtle – your strong IT partner. Today and tomorrow

If that seems to help, please "Mark as Solution"