Home » RDBMS Server » Server Administration » grouping codes that are listed consecutively and assigning them...
grouping codes that are listed consecutively and assigning them... [message #372021] Thu, 04 January 2001 11:49 Go to next message
Patti
Messages: 2
Registered: January 2001
Junior Member
I have a $ amt. with either a d or an a type code associated with it. ex. d, d, d, a, d, d, a, a
I want to sum $ only the d's that are together and then assign them to that a, and then sum the $ with the next set of d's and assign them to the next a, and leave the other a alone.
Re: grouping codes that are listed consecutively and assigning them... [message #372024 is a reply to message #372021] Thu, 04 January 2001 12:57 Go to previous message
spdevalla
Messages: 7
Registered: December 2000
Location: Rhode Island
Junior Member
select sum($fieldname) from table where
substr(fieldname,dposition in the field,1) = 'd'
Previous Topic: How to get connected for the first time ???
Next Topic: How to find the Size of the Database? - Urgent.
Goto Forum:
  


Current Time: Fri May 17 01:30:57 CDT 2024