Can any one please suggest how i can write the below query.
still am getting same error even though I have changed as below:
(CASE WHEN PRC_M = 'PCNT'
(FORMAT 'ZZZZZZZZZZ9.99') (CHAR(14))
WHEN PRC_M = 'FIXD'
(FORMAT '$$$$$$$$$$9.99') (CHAR(14))
END) AS DISC_PCT
the format of CASE Statement is The FORMAT and TITLE should come after in that order.
( CASE ... WHEN .... THEN .... ELSE ... END ) ( FORMAT ..... ) (TITLE ' XYZ')
Make sure the THEN and ELSE part both return same data types.
Hope this helps