Index: trunk/DataCheck/Sourcefile.sh
===================================================================
--- trunk/DataCheck/Sourcefile.sh	(revision 19487)
+++ trunk/DataCheck/Sourcefile.sh	(revision 19488)
@@ -254,6 +254,10 @@
    # add table
    query=$query" "$maintable"Status"
-   # add special join
+   # add special joins
    query=$query" "`getfromsetup $maintable "SpecialJoin"`
+   if [ "$1" = "set" ]
+   then 
+      query=$query" "`getfromsetup $maintable "SpecialJoinSet"`
+   fi
    # add join for step unless step is the same as maintable
    if ! [ "$step" = "$maintable" ]
@@ -275,5 +279,5 @@
          if [ "$1" = "set" ]
          then 
-            query=$query" "`getfromsetup $otherstep "SpecialJoin2"`
+            query=$query" "`getfromsetup $otherstep "SpecialJoinSet2"`
             query=$query" LEFT JOIN "$otherstep"Status USING("`getfromsetup $otherstep "Primaries"`") "
          fi
