Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kiblinger

    query with group by

    Aha - you're right. My description and example don't exactly match. Sorry about that! My example is what I want but I can't figure out how to describe it. It's spatial data, and some adjacent polygons share some common values and I need to move some of those values around.... Anyway, thanks...
  2. kiblinger

    query with group by

    Alas it isn't that simple. The values in the fields in my example are irrelevant except in respect to their being unique or not to a particular record. Even/odd, numerical value, the fact that they are integers etc., are all irrelevant. They are just placeholders. I think this is as close to a...
  3. kiblinger

    query with group by

    I think my original example was too terse. Combine my original description with this more complete example: I have things like this: SPU1 SPU2 A 1 NULL B 1 NULL C 1 2 D 1 2 E 2 NULL F 2 NULL G 2 3 H 3 NULL I 3 NULL J 4 3 K 4 NULL L 5 4 M 5 NULL N 5 NULL I want to change it...
  4. kiblinger

    query with group by

    I have some data in a table in an MDB and I am building a query in MS Access. Seems simple but so am I :) I have a structure that is essentially always like this for all my records (A-F in this simplified sample): SPU1 SPU2 A 1 NULL B 1 NULL C 1 2 D...
  5. kiblinger

    Inner Join and Count question

    That does it. Many thanks! One question: where can I read more about that "AS U" syntax? I am unfamiliar with what that does.
  6. kiblinger

    Inner Join and Count question

    OK, new twist: I want to look at a group of records that share a COMPLEXID. I want to know if at least one record has an XWALK of ESS, RSS, or REM. Then if it has at least one XWALK of EEM, EEM_LOW, LAG-O, LAG-C, LAG/EEM-O, or LAG/EEM-C. Then if it has at least one XWALK = INT. Then, out of...
  7. kiblinger

    Inner Join and Count question

    That does it. I never learned that "In" syntax correctly but now I have! Thanks!
  8. kiblinger

    Inner Join and Count question

    Yep you're right - I meant table. Sorry about that. Awesome. Now, what if I want to do that operation repeatedly for every set of records that have a distinct PLACE code? That is, there are say 5 records that are PLACE = '01' -- do that operation to them. Next round up the 7 records that have...
  9. kiblinger

    Inner Join and Count question

    oops -- #2 Should be, more properly: 2. Count how many of those selected records have XWALK = ESS or RSS or REM or EEM or INT
  10. kiblinger

    Inner Join and Count question

    My database is named "pugetsound." What I want to do, conceptually: 1. Select all records with PLACE = XYZ. 2. Count how many of those selected records have XWALK = A or B or C. 3. If that is 2 or more, update the EPU_Flag field with a '1' for all those records where PLACE = XYZ. This almost...
  11. kiblinger

    Update and Count question

    Many apologies - somehow got myself in the wrong forum.
  12. kiblinger

    Update and Count question

    I should have mentioned - I am trying to do this in MS Access -- so when I tried: Update pugetsound Set EPU_Flag = 1 From pugetsound Inner Join ( Select PLACE From pugetsound Where PLACE = '01' AND XWALK In ('ESS', 'RSS', 'REM', 'EEM', 'EEM_LOW'...
  13. kiblinger

    Update and Count question

    Aha - so "A" could just be any alias I make up - "temp" or "PDQ" etc. And I see now that you put the "XYZ" part where I thought it would go, so that means I must be learning something. So, that is probably going to do what I need. Now I'm not at work any more so it'll wait until Monday...
  14. kiblinger

    Update and Count question

    Also, now that I look at it longer, where is it selecting the records with Label = XYZ? Thanks again, ck
  15. kiblinger

    Update and Count question

    Wow! Cool, and fast! I think it makes sense to me (I am very inexperienced), except for the "As A" and "A.Label" parts. What are they doing? Is "A" one of the Type values?
  16. kiblinger

    Update and Count question

    I know I have the syntax totally wrong. I want to do something like: UPDATE Flag = 1 FROM Dataset WHERE ("Label" = 'XYZ' AND COUNT ("Type" = 'A' OR "Type" = 'B' OR "Type" = 'C' OR) >= 2) What I want, conceptually: 1. Select all records with Label = XYZ. 2. Count how many of those selected...
  17. kiblinger

    simple select distinct query question

    Ah right - of course. At that point I can just use: SELECT * FROM products WHERE flag = 'x' to get what I am ultimately going to need.... Thanks again.
  18. kiblinger

    simple select distinct query question

    Cool! Thanks! Now, what if I have: item_code menu_name flag a1 chairs x 2ee chairs xyz tables 4s tables x 5 tables 6r desks x aa benches ggg benches x and I...
  19. kiblinger

    simple select distinct query question

    SQL newbie. Can't think how to search for this so I'll just ask in hopes that someone is patient enough to answer: In a table called "products" I have 2 fields: item_code menu_name 1 chairs 2 chairs 3 tables 4...

Part and Inventory Search

Back
Top