Im doing Select statment with CASE but i got a problem i need to convert gl_acc and gl_cc to NUMBER right now they are varchar2. So the BETWEEN should be read as number not as charctor for that range!!!
And pull only those records where MEASURE not equals to NULL....
Thank-you for your HELP!
SELECT
xxx1,
ccc,
CASE WHEN GL_ACC BETWEEN 4001 AND 4500 AND
GL_CC = 'NONE'
THEN '"NS-'|| GL_ACC ||'"'
WHEN ((gl_acc BETWEEN 6101 AND 6390) OR
(gl_acc BETWEEN 6411 AND 6705)) AND
gl_cc = 'NONE'
THEN '"PV-'|| GL_ACC ||'"'
end as MEASURE
from.......................
And pull only those records where MEASURE not equals to NULL....
Thank-you for your HELP!
SELECT
xxx1,
ccc,
CASE WHEN GL_ACC BETWEEN 4001 AND 4500 AND
GL_CC = 'NONE'
THEN '"NS-'|| GL_ACC ||'"'
WHEN ((gl_acc BETWEEN 6101 AND 6390) OR
(gl_acc BETWEEN 6411 AND 6705)) AND
gl_cc = 'NONE'
THEN '"PV-'|| GL_ACC ||'"'
end as MEASURE
from.......................