January 16, 2009 at 6:39 am
Hie all
How do i write this t-Sql using join statements only
SELECT AR.SectionID ,O.OptionScore,AR.QuestionID,AR.SubSectionID
FROM
AuditResults AR
INNER JOIN [Option] OONAR.OptionID = O.OptionID
WHERE
AR.SiteAuditID = 4602
andO.QuestionID = AR.QuestionID ---i need a this to be an inner join under the FROM Clause.
Order BY AR.SectionID
January 16, 2009 at 6:41 am
SELECT AR.SectionID ,O.OptionScore,AR.QuestionID,AR.SubSectionID
FROM
AuditResults AR
INNER JOIN [Option] O
ON AR.OptionID = O.OptionID
and AR.QuestionID = O.QuestionID
WHERE
AR.SiteAuditID = 4602
Order BY AR.SectionID
Ie just move the and part from the where clause to the join clause..
Mike John
January 16, 2009 at 6:51 am
I DIDNT KNOW THAT,
Thank you very much.
January 16, 2009 at 7:36 am
omlac (1/16/2009)
I DIDNT KNOW THAT,Thank you very much.
yea you have too many things here to know ... that's nice to help each-other!
You are welcome!
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy