i used this code..
SELECT Sum([Session_Cost])
FROM [Session_Table] S INNER JOIN [Bookings_Table] B
ON S.[Session_Code] = B.[Session_Code]
WHERE B.[Paid?] = 0
and..is seasoned not familiar with?
it`s a subquery because that`s what i`m using it for. if i try and run it...
i`ve also tried other queries and they still show many rows, some even empty but still there. any way around this? because i will need to create reports using these values and they will just repeat :(
so..let`s say there are 4 bookings
booking 1 - cost
booking 2 - cost2
booking 3 - cost3
booking 4 - cost4
the sum function does (cost+cost2+cost3+cost4)=answer. when i run the query i get a table like:
answer
answer
answer
answer
the same answer..on 4 rows..i assume because it`s the number of...
thank you for you reply again Golom, however this just adds up all the rows. The total on each row is correct. It just repeats itself. What i wanted is to see only one row with this total, not add the rows together.
yess!! it works now :D thanks a lot!
another question tho..when it shows the calculated price, it shows the same total on 3 lines for example if there were 3 records counted. any way to only make it show it on one?
ok..i`m trying this and for some reason it`s not calculating the sum. it just shows the values found. i have 3 tables bookings_table, party_table and session_table. the session_code is a field in the session_code but exists also as a foreign key in the Bookings_table. any idea??
(SELECT...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.