Pulling multiple queries into one table or query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbatestblrock
    New Member
    • Sep 2007
    • 164

    Pulling multiple queries into one table or query

    Hello access gurus! I am need of some assitance. I am finally reaching the end or a grueling process. I say grueling, and I am sure its a snap for all of you, which is why I am hoping you all can help....

    I have four queries. Two different tables..
    three queries are coming from one table (Daily 1) and the other one is coming from the other table (Daily 2)

    All of these queries share a common field. "Store Number"

    I want the end result to be similar to this http://www.mykesdesign s.com/tblrock1/help/EXCEL.JPG

    except 5 more $ Deposited fields...



    here are the 4 queries

    http://www.mykesdesign s.com/tblrock1/help/ATMDEP.JPG (the ATMDEP field)
    http://www.mykesdesign s.com/tblrock1/help/NETSLS.JPG (the NETSLS field)
    http://www.mykesdesign s.com/tblrock1/help/DEPOSITS.JPG (the 6 DEP fields)
    http://www.mykesdesign s.com/tblrock1/help/ADJTAX.JPG (the ADJTAX field)

    I have posted screen caps because I am horrible at explaining things and I think you would appreciate them..


    I believe it is relatively simple but I couldn't find anything on google that was what I needed. I am going to continue my search. I do not know too much about sql queries, I know how to use the design view pretty well ^_^

    My search continues! I hope someone can help me!
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, there.

    Shots are nice but make little sense. You'd better explain it using words. ;)
    • You definitely don't need 4 queries to pull data from 2 tables, 1 query on the tables join would be pretty enough
    • Post [Daily1] and [Daily2] tabels metadata. Here is an example of how to post table MetaData :
      Table Name=tblStudent
      Code:
      [i]Field; Type; IndexInfo[/i]
      StudentID; AutoNumber; PK
      Family; String; FK
      Name; String
      University; String; FK
      Mark; Numeric
      LastAttendance; Date/Time
    • Explain please what is the reason(s) to have two tables.
    • Clarify please what data you want to pull from the tables: list of fields, filter criteria.

    Comment

    • mbatestblrock
      New Member
      • Sep 2007
      • 164

      #3
      ALRIGHT!

      I think I may have gotten it... Here is what the design view of my final query looks like.

      http://www.mykesdesign s.com/tblrock1/help/masterquery.JPG

      And here is what it looks like being run.
      http://www.mykesdesign s.com/tblrock1/help/result.JPG


      Now I am only hung up on one thing! FOR THE LIFE OF ME I couldn't get the dates and currency amounts to layout correctly while importing the external text file. IT WAS NOT HAPPENING...

      So does anyone know of way to format the query fields???

      the currency was giving me guff on the import like it was trying to add zeros to the end of my number making it in the millions... which would be nice.. but not accurate, I tried moving the decimal spot. I could not get it to work.. same with the dates, If I told to import as a date it would be blank in the field. So I had to tell it to import as text.

      any advice?


      sorry it is 2AM and I cannot think anymore!!!

      Comment

      • mbatestblrock
        New Member
        • Sep 2007
        • 164

        #4
        Originally posted by FishVal
        Hi, there.

        Shots are nice but make little sense. You'd better explain it using words. ;)
        • You definitely don't need 4 queries to pull data from 2 tables, 1 query on the tables join would be pretty enough
        • Post [Daily1] and [Daily2] tabels metadata. Here is an example of how to post table MetaData :
          Table Name=tblStudent
          Code:
          [i]Field; Type; IndexInfo[/i]
          StudentID; AutoNumber; PK
          Family; String; FK
          Name; String
          University; String; FK
          Mark; Numeric
          LastAttendance; Date/Time
        • Explain please what is the reason(s) to have two tables.
        • Clarify please what data you want to pull from the tables: list of fields, filter criteria.

        HAH sorry I think you posted same time I did. I didnt see this!

        the reason I have two tables is because of a ridiculous reason...

        I am importing for a fixed width file that is nearly 700 pages long.

        there are tons of records in here and each line is a new record.

        each record has reference guide to how it is layed out. And it just so happens that there is ONE field that overlapped with another.

        and me not knowing anything about queries, and diving too deep into a project like this, I had to kind a way around it.

        that is the only workaround I could think of...

        so when I import the file, I have to it twice now, another time for just that one field!




        ======== I hope that made sense??? again 2 am, I work at 8 AM.. LETHAL

        Comment

        • FishVal
          Recognized Expert Specialist
          • Jun 2007
          • 2656

          #5
          That doesn't make sense. Go bed. Tomorrow take a look at my questions and try to give relevant answers. This concerns particulary your tables metadata.

          Kind regards,
          Fish

          P.S. I recall your import issue pretty well. ;)

          Comment

          Working...