close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

recordset syntax help needed

Thread began 4/21/2017 9:58 am by Brendan | Last modified 4/25/2017 1:19 pm by Ray Borduin | 412 views | 3 replies |

Brendan

recordset syntax help needed

I am trying to update some reports after adding a quantity component to a donation site. I basically need to find the quotient of 2 fields (detialPrice * detailQuantity) and then SUM those amounts for like entries. Here is what I tried, and I'm getting an error that the column "pplTotal" is unrecognized.

SELECT (orderdetails.DetailPrice * orderdetails.DetailQuantity) AS pplTotal, DetailID, DetailSchool, DetailStudentF, DetailStudentL, sum(pplTotal) AS FRtotal

Sign in to reply to this post

Ray BorduinWebAssist

That column doesn't exist yet, you would have to use: SUM(orderdetails.DetailPrice * orderdetails.DetailQuantity)

Sign in to reply to this post

Brendan

it isn't working quite right. The recordset above is supposed to group entries by the students names, then return a total of all pledges made to them.

For example, if student John Smith has 2 entries in the database, one with price 50 quantity 1, and the other with price 5 quantity 10 - the result should be John Smith 100.

I assume this may be too much to do in one step, which is why I had originally tried to find the product of price and quantity, then sum the results of that operation.

Sign in to reply to this post

Ray BorduinWebAssist

SELECT (orderdetails.DetailPrice * orderdetails.DetailQuantity) AS pplTotal, DetailID, DetailSchool, DetailStudentF, DetailStudentL, sum(orderdetails.DetailPrice * orderdetails.DetailQuantity) AS FRtotal GROUP BY DetailStudentF, DetailStudentL

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...