• hfreeman (4/11/2014)


    The code faulters with this error

    Lookup Error - SQL Server Database Error: Divide by zero error encountered on line 154

    the start of the select query

    -----------------------------------------------------------------------------------------------------------------------------

    --Main Query: Final Display / Output

    -----------------------------------------------------------------------------------------------------------------------------

    SELECT

    (CASE

    WHEN sqBAQ.row_filter = 1 THEN sqBAQ.[type]

    ELSE ''

    END) AS object_type

    Are you able to provide more details? The field you listed (as is) shouldn't give that type of error as it is only a CASE Expression.