Re: Collection problem
- From: "Kristian F. Thomsen" <kft@xxxxxxxxxxxx>
- Date: Tue, 7 Jun 2005 15:15:59 +0200
Arrhh.... of course that is the reason :-) I should have known this :-)
Thanks Lars!
Br.
Kristian F. Thomsen
"Lars Norman Søndergaard" <lns@xxxxxxxxxxxxx> wrote in message
news:uLSXXpyaFHA.2520@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Kristian,
>
> The reason why you see this behaviour is really rooted in SQL: for each
> SMS_R_System.ResourceID multiple entries exists in Add/Remove Programs.
> Consequently you get "false" hits.
>
> Reformulate the query using a subselect statement:
> select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
> SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier,
> SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client where
> sms_R_SYSTEM.ResourceID not in (select
> SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID where
> SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName != "Microsoft .NET Framework
> 1.1")
>
> Thanks
> Lars Norman Søndergaard
>
> "Kristian F. Thomsen" <kft@xxxxxxxxxxxx> skrev i en meddelelse
> news:O5nBbppaFHA.1384@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi all,
>>
>> I have created a collection using this query:
>>
>> select SMS_R_System.ResourceId, SMS_R_System.ResourceType,
>> SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier,
>> SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from
>> SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on
>> SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
>> where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName != "Microsoft .NET
>> Framework 1.1"
>>
>> As you can see, I only want to se the computers that does not have the
>> .NET Framework 1.1 installed. But computers which has .NET Framework
>> installed, also appears in my collection.... why ?
>>
>> Thanks in advance
>>
>> Br.
>>
>> Kristian F. Thomsen
>>
>
>
.
- References:
- Collection problem
- From: Kristian F. Thomsen
- Re: Collection problem
- From: Lars Norman Søndergaard
- Collection problem
- Prev by Date: Re: Report/Query for all advertisments of a specific user
- Next by Date: SMS 2003 report from different databases
- Previous by thread: Re: Collection problem
- Next by thread: Report/Query for all advertisments of a specific user
- Index(es):