I have a Oracle Query
WITH cte AS (
SELECT
    category_id,
    category_name,
    parent_category_id,
    ltrim(sys_connect_by_path(category_name, '/'), '/') "ParentNames"       
FROM
    bg_categories
START WITH
    parent_category_id = - 1
CONNECT BY NOCYCLE
    PRIOR category_id = parent_category_id
 )
 SELECT
ROW_NUMBER() OVER (
    ORDER BY 
      bco.ID desc
  ) AS SLNO,
bco.*,
cte.*,
(
    SELECT
        COUNT(*)
    FROM
        object_document obj
    WHERE
        obj.object_id = bco.id
        AND object_type_id = 85
) AS customobjects_doc_count 
 FROM
bg_custom_objects bco
JOIN cte ON ( cte.category_id = bco.category_id )  where SLNO between 10 and 25
This query works fine with out this 'where SLNO between 10 and 25' where statement at the end , but with this it's showing "SLNO invalid identifier " error.
Pls help.
 
    