• mickyT (6/18/2013)


    Oracle765 (6/18/2013)


    Hi all

    yes i agree, i am not sure about the left out join thats what has confused me a bit.

    would this query provide the same results?

    SELECT distinct a1.Netbios_Name0,

    c1.SerialNumber0,

    a1.Operating_System_Name_and0,

    b1.Publisher0,

    b1.DisplayName0,

    b1.Version0,

    b1.InstallDate0,

    c1.TimeStamp

    FROMv_R_System a1,

    v_add_remove_programs b1,

    v_gs_PC_bios c1,

    v_gs_ccm_recently_used_apps d1

    where a1.resourceid = b1.resourceid

    and a1.resourceid = c1.resourceid

    and b1.resourceid = d1.resourceid

    and b1.groupid = d1.groupid

    ORDER BY a1.netbios_name0;

    Given that it appears that the v_gs_ccm_recently_used_apps table isn't used to filter or return any results in the original, I would say that it could be removed from the query altogether.

    In your query above you are changing the outer join to this table an inner join. This may affect (reduce) the rows returned.

    Be careful those are old ANSI-89 Joins, its much better to use the ANSI-92 Joins

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe