>>Would you try this:
>>IIF(ISNULL(Member.NoSchool),0,Member.NoSchool) AS NoSchool
>>replaced with:
>>nvl(Member.NoSchool,0) AS NoSchool
>
>Yes, that would resolve the issue. The same would go with:
>
>
>IIF(ISNULL(Member.NoSchool),000000,Member.NoSchool) AS NoSchool
>
>
>But, I am looking to understand why removing a where clause causes the data to be different. This simply doesn't make any sense to me.
>
>As for the updated SQL, such as how I did it or considering your approach, I am looking for the best approach that would allow me less changes when the data would be migrated to SQL Server. Do you know if anyone of those approaches are compliant with SQL Server:
>
>
>IIF(ISNULL(Member.NoSchool),000000,Member.NoSchool) AS NoSchool
>NVL(Member.NoSchool,0) AS NoSchool
>
In SQL Server they must be:
ISNULL(Member.NoSchool,0)
COALESCE(Member.NoSchool,0)
CASE WHEN Member.NoSchool IS NULL THEN 0 ELSE Member.NoSchool END
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.