From: Vesa Koponen
Sent: Friday, November 19, 2010 3:01 PM
Subject: SIDs magic bullet for fake unique identifiers
It seems that we have situations like the MasterProjectID field in the EPM project table where the GUID field contains nulls. SQL Server does not like nulls in unique identifiers if you try to filter in it. Sid has a magic solution. Convert the null to a ‘000-000’ GUID.
CAST(ISNULL(ProjectServer_Reporting.dbo.MSP_EpmLookupTable.MemberDescription, N’00000000-0000-0000-0000-000000000000′) AS uniqueidentifier)
Where MemberDescription contains the fake GUID.
With this conversion, everything works like a bird.