* query sdss*

def _query_sdss(
            self):
        """* query sdss*
        """
        self.log.info('starting the ``_query_sdss`` method')

        raDeg = float(self.raDeg)
        decDeg = float(self.decDeg)

        raUpper = raDeg + 0.02
        raLower = raDeg - 0.02
        declUpper = decDeg + 0.02
        declLower = decDeg - 0.02

        ################ >ACTION(S) ################
        sqlQuery = "SELECT TOP 1 rerun, camcol, field FROM PhotoObj WHERE ra BETWEEN %s and %s AND dec BETWEEN %s and %s" % (
            raLower, raUpper, declLower, declUpper,)
        self.log.debug('sqlQuery: %s' % (sqlQuery,))
        try:
            self.log.debug(
                "attempting to determine whether object is in SDSS DR12 footprint")
            result = self._query(
                sql=sqlQuery,
                url=self.url,
                fmt="html",
                log=self.log)
        except Exception, e:
            self.log.error(
                "could not determine whether object is in SDSS DR12 footprint - failed with this error %s: " %
                (str(e),))
            return -1

        self.log.debug('result: %s' % (result,))

        if "No objects have been found" in result or "No entries have been found" in result:
            match = False
            print "This location %(raDeg)s, %(decDeg)s is NOT in the SDSS footprint" % locals()
        elif "cornsilk" in result or "Your query output" in result:
            match = True
            print "This location %(raDeg)s, %(decDeg)s IS in the SDSS footprint" % locals()
        elif "minute" in result:
            match = 999
            print "Not sure if location %(raDeg)s, %(decDeg)s in SDSS, try again shortly" % locals()
            print result
        else:
            match = 999
            print "Not sure if location %(raDeg)s, %(decDeg)s in SDSS, here's the resulting HTML:" % locals()
            print result

        print "  See for yourself: http://skyserver.sdss.org/dr12/en/tools/chart/image.aspx?ra=%(raDeg)s&dec=%(decDeg)s&scale=0.8&opt=G&PhotoObjs=off&width=500&height=500" % locals()

        time.sleep(1)

        self.log.debug('sdss match: %s' % (match,))

        self.log.info('completed the ``_query_sdss`` method')
        return match