Recent content by nick2price

  1. N

    Help needed with update query

    I have two tables which are linked. To search for records i currently have the query (ignore the extras, this is done through java so the query looks a bit different) "select r.result, c.Nationality, c.First_Name, c.Last_Name " + "FROM (((tblResults as r " + "WHERE...
  2. N

    Query returning wrong values

    I see what your getting at with the inner joins. When i try and run the query as you have it, i am being returned with syntax error(missing operator)in query expression 'r.competitor_id=c.ID inner join..... inner join..... What would be causing this error?
  3. N

    Query returning wrong values

    The problem with that however is that it then expects competitor id as an extra parameter, where i only want it to return the 3 fastest times dependant on the event name and round number. Not sure how to do it so it only needs them two parameters.
  4. N

    Query returning wrong values

    Sorry, i am really bad at sql, this is to integrate in my java program. Would a join on these two just consist of r.competitor_id = c.competitor_id If so, where abouts would i fit this into my query?
  5. N

    Query returning wrong values

    Hi I have my tables in the following relationships Now i am trying to perform a query which will return the 3 fastest times, with the associated Nationality, First_Name and Last_Name (of the athletes that got the time) for a given event and round. I have done the query as follows SELECT...
  6. N

    Query help need please

    Lol, your last line solved it. The result field was set to text but as soon as i changed it to number, it worked. Cheers for the help.
  7. N

    Query help need please

    Even when i have it without DESC, it seems to return any three times. This is the reason i think my relationships might be wrong.
  8. N

    Query help need please

    Are my table relationships ok as seen in the picture in my original post? The reason why i ask this is that the query returns three results, but they are not the three fastest.
  9. N

    Query help need please

    I have a database with the relationships as so: I am trying to create a query which will return the top 3 fastest times for the 100M Run for Round 1. This is what i have attempted, please egnore the syntax and everything as it is written for java. String SELECT_TOP_TIMES = "select...
  10. N

    Primary keys to allow duplicates?

    is there any way to allow primary keys to allow duplicates?
  11. N

    INSERT INTO using a value from another table

    I am using java with jdbc to perform my sql operations. I have a primary key in one table and i want to set it as a foriegn key in another. I am trying to do somthing like this insert into events(name, meet_id) select '100 yard dash', id from meets where name = 'melrose games'; In java i am...
  12. N

    Database design in access

    k, get you. just one last question. When i run this in java, i get return the error, sun.jdbc.odbc.JdbcOdbcBatchUpdateException: [Microsoft][ODBC Microsoft Access Driver] You cannot add or change a record because a related record is required in table 'tblResults'. This is to do with me...
  13. N

    Database design in access

    Is it possible to set two fields as a primary key in the same table in access? Or is it possible to see the sql code of my created tables? Cos i need to create a table simular to this and i have no idea how to do it in access, How can i set two primary keys and how do i set foriegn keys and...
  14. N

    Database design in access

    Hi everyone, new here and a complete sql newbie. I have been working on this now for four days, and i am so close to having a nervous breakdown, lol. My scenario is for a swimming meet, this is what i came up with. A meet will have one or more events (e.g., 50 m freestyle, 4x100 freestyle...
Back
Top Bottom