• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with the Query  RSS feed

 
Kishen Singh Punjabi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following results from a query,

Key - Value
--------------
A - 1155
B - 1244
C - 1211
D - 1312
-------------

Is it possible to have the total Row at the bottom like below


Key - Value
--------------
A - 1155
B - 1244
C - 1211
D - 1312
-------------
Total - XXXX

Please help with the query.

Thanks in Advance!!!

 
Kishen Singh Punjabi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys any help..?
 
Rob Spoor
Sheriff
Posts: 20943
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's probably possible using a UNION:

You may have to cast the key if it's a numeric type, otherwise the UNION will most likely cause an error due to incompatible types.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!