Search results

  1. D

    Which sort of JOIN to use?

    Thanks folks, The LEFT JOINs seem to work. However, I'm having some difficulty in displaying the results from the recordset. The Email and SMS preferences tables contain pretty much the same headings, so how do I return these values from both tables? Currently my code is as follows (the...
  2. D

    Which sort of JOIN to use?

    Hi, I have a table of registered users with the following structure: tblRegistrant: Id | Name | Address | Email ------------------------------- I have two other tables, one containing the users' email preferences, and another containing the users' SMS texting preferences...
  3. D

    Newbie - JOIN multiple tables

    I think I've found the solution actually, using multiple LEFT JOINs.
  4. D

    Newbie - JOIN multiple tables

    Hi, I have the following four tables: ============================= tblLocation Id | Location _____________ 1 | London 2 | Birmingham 3 | Leicester ============================= tblType Id | Type _____________ 1 | Flat 2 | Maisonette 3 | Bungalow...
  5. D

    Joining 6 tables

    Thanks Pat, I've got a semi-working solution now: strQuery = "SELECT A.*, " & _ "B.*, " & _ "C.*, " & _ "D.*, " & _ "E.*, " & _ "F.* " & _ "FROM (((((tblProducts A " & _ "INNER JOIN tblPartManufacturer B ON (A.PartManufacturer_Id = B.Id)) " & _ "INNER JOIN tblPartType C ON...
  6. D

    Joining 6 tables

    I'm trying to build it up, presuming that if I can join three tables, then six should be possible too. The following doesn't even seem to work: SELECT tblPartType.*, tblVehicleType.* FROM tblProducts JOIN tblPartType ON tblProducts.PartTypeId = tblPartType.Id JOIN tblVehicleType ON...
  7. D

    Joining 6 tables

    Hi, Maybe someone can help. I'm struggling to find resources to help me join 6 tables through a SQL query to run on an ASP page. There are five tables which are linked together by one table (tblProduct): tblPartManufacturer: Id (PK) / PartManufacturer tblPartType: Id (PK) / PartType...
  8. D

    SELECT dates BETWEEN problem??

    Thanks very much panaseam, I do belive that's sorted me out. Much appreciated.
  9. D

    SELECT dates BETWEEN problem??

    Hi, this is driving me crazy. I have an Access table containing a field called "DateOfInput". This is set as Date/Time data type with a default value of 'Date()'. When I insert a new record into the table, the date feild is automatically filled with the following example data - in dd/mm/yyyy...
  10. D

    SELECT DISTINCT ORDER BY problem

    Thanks very much Rose, just the job! Much appreciated.
  11. D

    SELECT DISTINCT ORDER BY problem

    Thanks, but wow! What a crazy limitation. Okay, so if I remove the Primary Key field, then it still goups or selects distinct in alphabetical order. Is there a way just to pull distinct records from a table without them being alphabetised? I can't believe something so basic can be so difficult!
  12. D

    SELECT DISTINCT ORDER BY problem

    I've tried GROUP BY as well, and this has similar problems. You can't seem to be able to group by one field and order by another. Is this correct?
  13. D

    SELECT DISTINCT ORDER BY problem

    Hi, I have an Access table with two columns: Column 1: Id (Primary key auto-number) Column 2: RandomWords (Text field not sorted in any particular order) All I want to do is select all DISTINCT random words without them being sorted alphabetically. If I do: SELECT DISTINCT RandomWords, Id...
  14. D

    INNER JOIN problem

    Thanks. How does it look "crap". It follows the exact format of: SELECT field FROM table1 INNER JOIN table2 ON table1.PK = table2.PK And it works perfectly. :)
  15. D

    Beginner: Many-to-many relationship

    Apologies for my poor wording. The site will never to my knowledge require this functionality - else I would have incorporated it into the database design.
  16. D

    INNER JOIN problem

    Thanks very much, this is working now...
  17. D

    INNER JOIN problem

    Hi, further to my troubles today, I'm having problems with a JOIN statement. I have three tables: tblUniversity: UniversityId (Primary Key) Name tblQualification QualificationId (Primary Key) Type tblUniversityQualification: Id (Primary Key) UniversityId (Foreign Key)...
  18. D

    Beginner: Many-to-many relationship

    But if I want to select data from more than one table I have to use a JOIN in the script, regardless of whether the tables are related in access, yes? I think I've managed to get all the data into the table correctly now anyhow.
  19. D

    Beginner: Many-to-many relationship

    This database is being used solely on the web - including adding new records, so I guess the tables don't actually have to be linked in Access since I'm going to have to join them with SQL code in the script running the web pages anyhow. I ended up looking-up all of the records and inserting...
  20. D

    Beginner: Many-to-many relationship

    Only one type of award is being used for each subject at the moment. It's going to be for a very specific range of qualifications actually, so this isn't an issue at the moment. I'm really just wondering how to link two tables together via a junction table to enable many to many relationships...
Back
Top Bottom