Jun 9, 2004 #1 paispatin Technical User Oct 21, 2003 62 A1 Dear all, I have a cursor like this : mycursor field : code, description, amount How do I counting amount total at mycursor with SELECT SQL? Thank you in advance
Dear all, I have a cursor like this : mycursor field : code, description, amount How do I counting amount total at mycursor with SELECT SQL? Thank you in advance
Jun 9, 2004 #2 mm0000 IS-IT--Management May 19, 2002 295 IN I think you want the total value of the amount fields, if I have understood correctly You could use : select sum(amount) from mycursor into cursor mytotal It will create a cursor with a single field with the total amount. or for a specific code select sum(amount) from mycursor where code = 'somecode' into cursor mytotal HTH Upvote 0 Downvote
I think you want the total value of the amount fields, if I have understood correctly You could use : select sum(amount) from mycursor into cursor mytotal It will create a cursor with a single field with the total amount. or for a specific code select sum(amount) from mycursor where code = 'somecode' into cursor mytotal HTH
Jun 9, 2004 Thread starter #3 paispatin Technical User Oct 21, 2003 62 A1 Yes, right. This is what I want. Thank you very much. Upvote 0 Downvote