Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    16

    Unanswered: Query needs checking over

    I am accessing my database through java, so if my query has extra syntax please egnore it. I have done the query myself, so its problably really bad, so if anyone could help me clean it up that would be a great help.
    cheers
    Code:
    	  "select TOP 3 r.result " +
          "from tblResults as r " +
          "where r.Event_ID = " +
                "(select e.ID " +
                "from tblEvent as e " +
                "where e.Event_Name = '100M Run') " +
          "and r.Round_ID = " +
          		"(select ro.ID " +
                "from tblRound as ro " +
                "where ro.Round_Number = 'Round_1') " +
                "order by r.result";

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What's the question?
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by georgev
    What's the question?
    "plz can u clean up da query?"
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •