Formatting Orcal query

Hell All,

I have this query

"with DISTINCT_GROUP_MARGINS AS (
SELECT distinct CUSTOMER_GROUP, FX_MARGIN
FROM FCUBS.FXTM_CUST_MARGIN_CUSTOM
WHERE record_stat =‘O’ and AUTH_STAT=‘A’ and CUSTOMER=‘ALL’
AND ( CUSTOMER_GROUP LIKE ‘B%’)
),

MAX_MIN_MARGINS AS (
SELECT CUSTOMER_GROUP, MAX(FX_MARGIN) AS MAX_MARGIN, MIN(FX_MARGIN) AS MIN_MARGIN
FROM DISTINCT_GROUP_MARGINS
GROUP BY CUSTOMER_GROUP
)

SELECT CUSTOMER_GROUP, MAX_MARGIN
FROM MAX_MIN_MARGINS
WHERE MAX_MARGIN = MIN_MARGIN
AND MAX_MARGIN = 0.6

order by CUSTOMER_GROUP
;"

how to format this query ! i know the passing variable is ‘{var}’ but its not happy with

With, like …%…etc

Thanks in advance

Hi @Hazem_Saleh

Check the thread,It might help you

Hope it helps!!

1 Like

Thanks it does, i fixed my query,

But i wonder do we have general syntax guide when it comes to queries in general ?

for example if use as is in sql developer it never match in upath i have to remove things like ’

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.