locked
How to add a calculated field in query out-put? RRS feed

  • Question

  • Dear All,

     

    I wanted include a calculated field (column) in my query output. how do i go about that?

     

    Please help me.

    Tuesday, June 26, 2007 10:24 AM

Answers

  •  

     

    SELECT amtcol1, amtcol2, amtcol1 + amtcol2 as 'Total'

     

    or

     

    SELECT amtcol1, amtcol2, 'Total' = amtcol1 + amtcol2

     

     

    Tuesday, June 26, 2007 10:27 AM