Hi there,
I'm struggling to select all "cOperationId" from the Table and get their combined sum by name and sum.
I know how to query 1 by 1, but is there any solution to get all and list them?
The database table looks like this:Code:Dim Sql, stDevId stDevId = "NPRCS-003" Sql = "SELECT COALESCE(SUM(cQuantity), 0) AS total FROM AppBlackBoxData WHERE cDeviceId='" & stDevId & "' AND cDate=CURDATE()" Set Rs = Db.Execute(Sql) Response.Write(Rs.Fields("total").Value)
I would like to have output like this for example:
Any help would be appriciated,Code:SW0001 = 1 SW0002 = 2 SW0003 = 3 PK0004 = 7
Kind regards,
Viktor




Reply With Quote
