I have a query that needs to be extended. The scope is following:
I am selecting field GLSUB. In addition I need to select the field GLALTY if there is a value. GLSUB and GLALTY need to be combined into one field with a slash between.
Example: GLSUB = 01004, GLALTY= AV, Result needs to be = 01004-AV. I only need to do this if field GLALTY have a value.
Not sure how to do this. Thank you.
I am selecting field GLSUB. In addition I need to select the field GLALTY if there is a value. GLSUB and GLALTY need to be combined into one field with a slash between.
Example: GLSUB = 01004, GLALTY= AV, Result needs to be = 01004-AV. I only need to do this if field GLALTY have a value.
Not sure how to do this. Thank you.
Code:
select glsub, sum(decimal(glu * .01, 31, 2)), glum from vgiprddta/f0911li where glmcu = @jobnumber and (globj = '63500 ' or globj = '73500 ' or globj = '73510 ') and (gllt = 'AA' or gllt = 'AU') and glexa = 'Equipment Distribution' group by glsub, glum;




Comment