Subject | ODP: ODP: [firebird-support] Silly selection problem ... |
---|---|
Author | Karol Bieniaszewski |
Post date | 2019-03-04T21:34:33Z |
>>Can you explain how?
I do not study your topic much and i can be wrong here. But maybe you got the idea about what i am thinking about.
SELECT
(SELECT
PRE.ITEM_CONTENT_ID
FROM
FISHEYE_GALLERY_IMAGE_MAP PRE
WHERE
PRE.GALLERY_CONTENT_ID = :parent_id
AND PRE.ITEM_POSITION < FGIM.ITEM_POSITION
ORDER BY
PRE.ITEM_POSITION DESC ROWS 1) AS PRE_ITEM_CONTENT_ID
,
(SELECT
POST.ITEM_CONTENT_ID
FROM
FISHEYE_GALLERY_IMAGE_MAP POST
WHERE
POST.GALLERY_CONTENT_ID = :parent_id
AND POST.ITEM_POSITION > FGIM.ITEM_POSITION
ORDER BY
POST.ITEM_POSITION ASC ROWS 1) AS POST_ITEM_CONTENT_ID
FROM
FISHEYE_GALLERY_IMAGE_MAP FGIM
WHERE
FGIM.ITEM_CONTENT_ID = :content_id
Regards,
Karol Bieniaszewski