Here is what I have now... when I run the query it asks me for the [t.segments].
After I enter the number I notice 2 things wrong.
1) It multiplies the answer by the number I entered.
Example:
When 1 is entered:
|Total_agree| Total_segments|Value|
90 6 15
When 2 is...
I prayed to the hockey Gods last night to help... not sure if it would help, has not helped my Bruins yet.[banghead]
Here is what I have tried:
1)[americanflag]I got rid of AS [%$##@_Alias] by labeling it A_Name.
2)[ponder]I moved the 2nd query up. The 2 queries are concurrent, not dependent...
I have run the query with and without this statement. I get the same error.
I am using Microsoft Access 2002. It adds the the ". AS [%$##@_Alias];"
I am not sure why.
This example no errors but it does not calculate Total_Segments it asks for it to be entered:
SELECT sum (Anterior_Agree + Septum_Agree + Apical_Agree + InferiorApical_Agree + Inferior_Agree + PosteriorLateral_Agree) / Total_segments AS ["All_Agree / Total_segments"]
FROM [SELECT...
To go back to basics...
query1/query2 = answer
query1 (Total_agree)
query2 (Total_segments)
Both query1 and query2 are from the same table(tlbcomments).
No columns over lap.
It has got to be something simple....
PHV, LKB
Thanks for trying, but it still errored. I did some reading, the word segment is a restricted word in SQL. I am not sure if "segment" and "segments" are considered the same. Anyway I changed the column name from "segments" to "headache".
I then tried all of the above suggestions...
LKB
1)The comma did not help.
2)This segment works(the math anyway).
When I run it, it asks for Total_segments. Wants a quantity.
So it is not seeing where to calculate Total_Segments:
(SELECT sum (segments) AS total_segments
FROM tblComments)
Here is what works:
SELECT sum...
The math on the first SELECT line works.
result:
|"All_Agree/Total_Segments"|
|0.994465 |
But I am asked for the Total_Segments, I must enter by keyboard.
I tried the Total_segment string after
cath="ischemia"))))
(Select sum (segments) AS Total_segment
From...
LKBrwnDBA
Here is what works:
SELECT sum (Anterior_Agree + Septum_Agree + Apical_Agree + InferiorApical_Agree + Inferior_Agree + PosteriorLateral_Agree) AS All_Agree
FROM [
SELECT Anterior_read, Anterior_cath, Sum(1) AS Anterior_Agree, Septum_read, Septum_cath, Sum(1) AS Septum_Agree...
LKbrown great!! I am 95% there!
How do I tie these last pieces in.
Select All_Agree/Total_segments AS Percent_Agreement ***this divides one query into the other to give a percent***
From (
Select sum (segments) AS Total_segments ***this is a summed column found in the original...
Thank you for the post. There are no examples of written code there. The theory/explanation of relation tables is great, but I learn more from seeing written code.
I know what I want for an answer,(the percent). I know all the elements are achivable from the data in the table...
Thank you for your help.
Your suggestion gave me the same result.
The answer table looks like this:
Anterior_read| Anterior_cath|Anterior_Agree| Septum_read|Septum_cath|Septum_Agree| ....
Ischemia Ischemia 1 Normal Normal 1
Normal Normal 3...
I'm a beginner with SQL started on monday.
I could use some help.
My table:
column name
1 Anterior_read
2 Septum_read
3 Apical_ read
4 InferiorApical_read
5 PosteriorLaterial_read
6 Inferior_read
7 Anterior_cath
8 Septum_cath
9 Apical_ cath
10...
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.