Registered member login:
Register Now
Altirigos » Altiris Administrators » SQL » Collection Picker SQL help

» Current Poll
Do you leave the Aclient enabled?
YES - 82.93%
102 Votes
NO - 17.07%
21 Votes
Total Votes: 123
You may not vote on this poll.
» Stats
Members: 9,465
Threads: 11,733
Posts: 55,228
Top Poster: Nick (4,981)
Welcome our newest member, Serendipity
» Online Users: 28
0 members and 28 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 123
Reply
Old 10-01-2008, 12:44 PM   #1 (permalink)
 
titan90's Avatar
 
Status: Altiris Admin
Join Date: 08-07-2006
Location: TX
Posts: 67


Collection Picker SQL help

Does anyone know the correct SQL syntax to add the use of a collection picker to the unmanaged computers report?

I can add the picker but it's chocking on the SQL query to make it use the picker.

Working SQL qUERY:

SELECT distinct va._ResourceGuid, vri.Name,
isnull(PU.Domain, N'') as Domain, isnull(PU.[User], N'') as [User],
isnull(AC.[OS Name], N'') as [OS Name],
isnull(AC.[OS Version], N'') as [OS Version], va.Status,
va.[Serial Number], va.[System Number], va.[Barcode], va.[Manufacturer], va.[Model]
FROM vAsset va
join vResourceItem vri on vri.Guid = va._ResourceGuid
join ResourceTypeHierarchy rth on rth.ResourceTypeGuid = vri.ResourceTypeGuid
left join Inv_AeX_AC_Identification AC on AC._ResourceGuid = va._ResourceGuid
left join Inv_AeX_AC_Primary_User PU on PU._ResourceGuid = va._ResourceGuid
and PU.[_id]=(SELECT TOP 1 p.[_id] FROM [Inv_AeX_AC_Primary_User] p WHERE va._ResourceGuid=p.[_ResourceGuid] order by p.[_id] desc)
inner join %SecurityFilterParameter% t on t._ResourceGuid = va._ResourceGuid
where rth.BaseResourceTypeGuid = '493435F7-3B17-4C4C-B07F-C23E7AB7781F' and vri.IsManaged=0
AND (cast(%Status% as uniqueidentifier) = 0x0 or va._AssetStatusGuid= %Status% )
order by vri.Name

Need to add a call to use the collection picker: ??

INNER JOIN dbo.CollectionMembership cm ON Inv_AeX_AC_Identification
._ResourceGuid = cm.ResourceGuid
Where cm.CollectionGuid ='%Collection%'
titan90 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 12:59 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos