Gossamer Forum
Home : General : Databases and SQL :

help on sql : sum

Quote Reply
help on sql : sum
   

I have fields Name,Designation,Days and Telephone.

How to sum the Days up and showing all the fields??

i tried and got a error.

Thanks

strSQL = "SELECT Name,SUM(DAYS) FROM Info WHERE INSTR(Info.Name,'" & strSearch & "')
Quote Reply
Re: [gnehs] help on sql : sum In reply to
I need to add on something.

I want to output this

---------------------------
|name | Days | Desingation |
---------------------------
|A | 2 | GG |
---------------------------
|A | 3 | GG |
---------------------------

to this

2 + 3 =5


---------------------------
|name | Days | Desingation |
---------------------------
|A | 5 | GG |
---------------------------

Last edited by:

gnehs: Aug 14, 2003, 2:40 AM