RE: Duplicate entries on reports
From: Mick (Mick_at_discussions.microsoft.com)
Date: 07/02/04
- Previous message: Alan Tchochiev [MSFT]: "Re: Collection gold lock"
- In reply to: Morne: "RE: Duplicate entries on reports"
- Next in thread: Morne: "RE: Duplicate entries on reports"
- Reply: Morne: "RE: Duplicate entries on reports"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 2 Jul 2004 11:49:02 -0700
Yep, I'm getting duplicate entries as well. Here is the SQL statement for that report,
SELECT Distinct SYS.Name0, IPSUB.IP_Subnets0, NETW.IPSubnet0,
IP.IP_Addresses0, NETW.DefaultIPGateway0
FROM v_RA_System_IPSubnets IPSUB, v_R_System SYS, v_GS_NETWORK_ADAPTER_CONFIGUR NETW, v_RA_System_IPAddresses IP
WHERE SYS.ResourceID = IPSUB.ResourceID AND NETW.ResourceID = SYS.ResourceID AND
IP.ResourceID = IPSUB.ResourceID AND IP_Subnets0 LIKE @variable
Order by SYS.Name0
The problem is created by the DISTINCT statement in addition to NULLs being present. I'm not sure why NULLs are present, or more accurately, being populated, in the v_GS_NETWORK_ADAPTER_CONFIGUR table, but here is a way to get around the problem. Add "and netw.defaultipgateway0 is not null" anywhere in the WHERE clause. I have changed that report on my site to use the following query:
SELECT Distinct SYS.Name0, IPSUB.IP_Subnets0, NETW.IPSubnet0,
IP.IP_Addresses0, NETW.DefaultIPGateway0
FROM v_RA_System_IPSubnets IPSUB, v_R_System SYS, v_GS_NETWORK_ADAPTER_CONFIGUR NETW, v_RA_System_IPAddresses IP
WHERE SYS.ResourceID = IPSUB.ResourceID AND NETW.ResourceID = SYS.ResourceID AND
IP.ResourceID = IPSUB.ResourceID and netw.defaultipgateway0 is not null AND IP_Subnets0 LIKE @variable
Order by SYS.Name
HTH
"Morne" wrote:
> Hi. Thanks for the reply. The report is the standard report for "all machines in a specific subnet" which is installed by default when rolling out sms 2003.
>
> "Mick" wrote:
>
> > Need a little more information. Are these custom or canned reports? What report types are you referring to? Some reports should/could produce duplicate entries.
> >
> > "Morne" wrote:
> >
> > > Hi. Any idea why I would have duplicate entries for machines on the reports and how I can get rid of them.
> > >
> > > Thanks,
> > >
> > > Morne
- Previous message: Alan Tchochiev [MSFT]: "Re: Collection gold lock"
- In reply to: Morne: "RE: Duplicate entries on reports"
- Next in thread: Morne: "RE: Duplicate entries on reports"
- Reply: Morne: "RE: Duplicate entries on reports"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|