By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,083 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

Pulling multiple queries into one table or query

100+
P: 164
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.mykesdesigns.com/tblrock1/help/EXCEL.JPG

except 5 more $ Deposited fields...



here are the 4 queries

http://www.mykesdesigns.com/tblrock1/help/ATMDEP.JPG (the ATMDEP field)
http://www.mykesdesigns.com/tblrock1/help/NETSLS.JPG (the NETSLS field)
http://www.mykesdesigns.com/tblrock1/help/DEPOSITS.JPG (the 6 DEP fields)
http://www.mykesdesigns.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!
Oct 16 '07 #1
Share this Question
Share on Google+
4 Replies


FishVal
Expert 2.5K+
P: 2,653
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
    Expand|Select|Wrap|Line Numbers
    1. Field; Type; IndexInfo
    2. StudentID; AutoNumber; PK
    3. Family; String; FK
    4. Name; String
    5. University; String; FK
    6. Mark; Numeric
    7. 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.
Oct 16 '07 #2

100+
P: 164
ALRIGHT!

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

http://www.mykesdesigns.com/tblrock1/help/masterquery.JPG

And here is what it looks like being run.
http://www.mykesdesigns.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!!!
Oct 16 '07 #3

100+
P: 164
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
    Expand|Select|Wrap|Line Numbers
    1. Field; Type; IndexInfo
    2. StudentID; AutoNumber; PK
    3. Family; String; FK
    4. Name; String
    5. University; String; FK
    6. Mark; Numeric
    7. 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
Oct 16 '07 #4

FishVal
Expert 2.5K+
P: 2,653
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. ;)
Oct 16 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.