Search results

  1. N

    LEFT JOIN missing records

    Wow, I can't believe I haven't bumped my head against this before. I imagined that the WHERE criteria were being applied only to the INVLOC table before the join. Thank you!
  2. N

    LEFT JOIN missing records

    I have 2 tables: PARTS and INVLOC. PARTS contains 15,413 records When I run the following query, I am only getting 12,889 records returned: SELECT PARTS.*, INVLOC.qty_on_hand FROM PARTS LEFT JOIN INVLOC ON PARTS.part_num = INVLOC.item_no WHERE INVLOC.loc = 'EX' ORDER BY PARTS.ID;I am missing...
  3. N

    Query works w/ Access, not with SQL Server

    Ok so I actually figured out what the problem was. I guess I had the tables joined in the wrong order. This was my original query (shortened/substituted stuff for readability): SELECT xxx FROM (A LEFT JOIN B ON A.xxx = B.xxx) LEFT JOIN C ON B.xxx = C.xxx WHERE xxx When I switched to this it...
  4. N

    Query works w/ Access, not with SQL Server

    How would I find that? The database these tables are in is not mine, it's a piece of software my company uses for inventory etc. I am just linking to some of the tables to reference inventory levels and whatnot in some reports/forms that I use which are separate from the main program. I had...
  5. N

    Query works w/ Access, not with SQL Server

    I have run into a frustrating problem I can't make any sense of. I have a query that joins 3 tables. It works fine when the first table is an Access table, but throws an error message when I change the first table to a linked table (SQL Server). The second two tables are always linked tables and...
  6. N

    Table Structure

    Thanks for your response. I had considered something like that too. But the scenario where a machine is received -> sent out -> returned -> sent out -> returned -> estimate completed is still throwing me off. If I only have the one additional date field in the repairs table I would have to...
  7. N

    Table Structure

    Ok this is a long table design question I have been having trouble wrapping my head around. I have a database my company uses to keep track of equipment that we repair. Currently we have a table 'repairs', with fields like: ID, customer, equip_type, serial_num, date_received...
  8. N

    sort by user input order

    Hello. I am not sure exactly how to word this problem. Hopefully someone understands what I am trying to do here. I have a simple form with a text box, I enter a series of part numbers separated by newlines, and then I use the following code to query for each of the separate part numbers: Dim...
  9. N

    Assignining Primary Key Value

    Thank you! Very informative link
  10. N

    Assignining Primary Key Value

    Assigning Primary Key Value Hello. I had already posted this in the General forum but then I found this one and I think this might be the proper place for my question. I have an access form which includes my primary key field "ID". Normally when I use this form to enter a new record this field...
  11. N

    Assigning Primary Key Value

    Hello All. First time poster - I hope I am posting this in the right forum. I have an access form which includes my primary key field "ID". Normally when I use this form to enter a new record this field displays "(New)" until I enter data in any other field, then the ID field updates to...
Back
Top Bottom