I want to merge catetegory_id
and subCategory_id
into one column. But I don't know how to do it in flexible query. Below code is what I want to do
SELECT * FROM
(SELECT
ccr.targetpk as pk
FROM
Categories cc
JOIN Cat2CatRel ccr ON cc.pk = ccr.sourcepk
WHERE cc.p_code = '0106')
UNION SELECT CATE.pk as pk FROM CATEGORIES cate WHERE CATE.p_code = '0106'
I need a flexible query which works same as above code.