Query Output

  • Thread starter scottydont2121 via AccessMonster.com
  • Start date
S

scottydont2121 via AccessMonster.com

Help,

I am working with make table queries. I have a A make table query and a B
make table query each with various information that the query has preformed.
I am trying to get the following output into a text file.

A Make Table Information
B Make Table Information
A Make Table Information
B Make Table Information
etc.

There are over 300 items in each table. Each A Corresponds with a B. I need
to keep the 2 records separate for where i have to upload them.

I tried having a common identifier for the two tables and creating a big
query with all the information on, but i still cant get the output to be
above.

Help Please
Any questions please ask.

Thanks
 
S

scottydont2121 via AccessMonster.com

Just thinkin though this, I probably dont need to use make table queries, I
can probably just do it through regular queiries.

However Ever it i can quiery i still need some way to get my information to
print the two records one after the other. Wth the B query correalting with
the A Table.

Help Again Please, this is driving me nutz.
 
K

KARL DEWEY

It sounds like you are trying to include all the data of the table in the
query. It that is what you are doing then there is a better way to store,
transport, and retrieve data.
You can paste the SQL of your query in a Word document and also paste the
data from the table as a table in the same document.

You can copy the SQL and paste in Access, checking all the double quotes as
Word somehow uses a different character, create the table, Copy the table
data, and paste append into the Access table.
 
S

scottydont2121 via AccessMonster.com

Maybe I need to use Macros to inter-mingel the two queries.

Thoughts?
Just thinkin though this, I probably dont need to use make table queries, I
can probably just do it through regular queiries.

However Ever it i can quiery i still need some way to get my information to
print the two records one after the other. Wth the B query correalting with
the A Table.

Help Again Please, this is driving me nutz.
[quoted text clipped - 19 lines]
 
S

scottydont2121 via AccessMonster.com

Hey Kary,

Thanks for getting back to me.

Would your idea be a perminant solution, or would I have to do this
everything I was trying to create this file?

I am trying to import a file into Access into a template table, and then
query the information into the A and B records, and then export it into a
text file.

I do this with a different kinda a file and it works fine, but what is
messing me up is that they B table relys on the A table and i need them to
intertwine

KARL said:
It sounds like you are trying to include all the data of the table in the
query. It that is what you are doing then there is a better way to store,
transport, and retrieve data.
You can paste the SQL of your query in a Word document and also paste the
data from the table as a table in the same document.

You can copy the SQL and paste in Access, checking all the double quotes as
Word somehow uses a different character, create the table, Copy the table
data, and paste append into the Access table.
[quoted text clipped - 19 lines]
 
K

KARL DEWEY

they B table relys on the A table and i need them to intertwine
What do you mean by this?

I really do not know what you are trying to do.

Post sample data as it would pass from element to element.

--
Build a little, test a little.


scottydont2121 via AccessMonster.com said:
Hey Kary,

Thanks for getting back to me.

Would your idea be a perminant solution, or would I have to do this
everything I was trying to create this file?

I am trying to import a file into Access into a template table, and then
query the information into the A and B records, and then export it into a
text file.

I do this with a different kinda a file and it works fine, but what is
messing me up is that they B table relys on the A table and i need them to
intertwine

KARL said:
It sounds like you are trying to include all the data of the table in the
query. It that is what you are doing then there is a better way to store,
transport, and retrieve data.
You can paste the SQL of your query in a Word document and also paste the
data from the table as a table in the same document.

You can copy the SQL and paste in Access, checking all the double quotes as
Word somehow uses a different character, create the table, Copy the table
data, and paste append into the Access table.
[quoted text clipped - 19 lines]
 
J

John Spencer

Have you considered a UNION query? Assuming that you have some field (or
Fields) that allow you to match the records in A with the records in B.

SELECT "A" as SourceTable, A.MatchField, A.XXX, A.YYY
FROM TableA as A
UNION ALL
SELECT "B" as SourceTable, B.MatchField, B.XXX, B.YYY
FROM TableB as B
ORDER BY MatchField, Source

If you don't want to export the Source then build the union query and then use
it in another query

SELECT Matchfield, xxx, yyy
FROM qUnionQuery
ORDER BY Matchfield, SourceTable

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
S

scottydont2121 via AccessMonster.com

Hey Karl,

I have two tables.

A Table: Record, EmpNumber, Dept, Space, Expr2
B Table: Record, Pay, Shift, Week, Amt, Position, Charged Dept, Space,
Entity, Expr 2

I have a main table called Data: which has the info above on. I run the
make table queries of Data table to get the information to be like the A
table and B table. However here is my problem. I need to export that
information to a text file to be in a certain format. It needs to be:

A Table info
B Table info
A Table info
B Table info
etc.

The A table record is specific to an employee and the b table info is
specific to the A table.

I need it to look exactly like above A record, then B record in order to
upload it into our system.

I appreciate your help.
Thanks


KARL said:
What do you mean by this?

I really do not know what you are trying to do.

Post sample data as it would pass from element to element.
Hey Kary,
[quoted text clipped - 26 lines]
 
K

KARL DEWEY

I still do not follow what you want.
Did you consider John's suggestion of a union query?

Post sample data from the tables (phony data will work so long as it is same
type - numbers, alpha, dates, etc.) listing the fields the data is contained.

Then post how you would like for that same data to appear in your export file.

--
Build a little, test a little.


scottydont2121 via AccessMonster.com said:
Hey Karl,

I have two tables.

A Table: Record, EmpNumber, Dept, Space, Expr2
B Table: Record, Pay, Shift, Week, Amt, Position, Charged Dept, Space,
Entity, Expr 2

I have a main table called Data: which has the info above on. I run the
make table queries of Data table to get the information to be like the A
table and B table. However here is my problem. I need to export that
information to a text file to be in a certain format. It needs to be:

A Table info
B Table info
A Table info
B Table info
etc.

The A table record is specific to an employee and the b table info is
specific to the A table.

I need it to look exactly like above A record, then B record in order to
upload it into our system.

I appreciate your help.
Thanks


KARL said:
they B table relys on the A table and i need them to intertwine
What do you mean by this?

I really do not know what you are trying to do.

Post sample data as it would pass from element to element.
Hey Kary,
[quoted text clipped - 26 lines]

--



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top