i have created a query using the sql view, and want to make this query a table. is there any way i can do that. i have tried clicking on query-make table query, but this takes me to the design view and it completely neglects what i had in sql view.
Thanks
Ah, you can't view a Union query in design view. If you're UNION query is returning results without a problem, then just save it and build a new query from it. This new query will be viewable in design view and you can use the make-table functionality
11 2813
So you want to make a table based on the results of a SELECT query?
Using Access 2003, I created a SELECT query in SQL view. I then clicked Query->Make-Table query... and Access switched to design view, correctly filling in the grid from my SQL view.
I was presented with a dialog asking for a new table name, and whether to create in this database or another.
I gave a name and chose current database. I was left in design view.
Changing to SQL view, my SQL statement was now altered correctly to a make-table query.
What happened when you clicked Query->Make-Table query...?
when i click query> make table query access switches to design view, but the grid is empty, and has no fields filled out
Further testing (Access 2003)
If the SQL can be represented in GridView, Access will do so when Make-Table selected.
If the SQL cannot be represented (i.e. UNION QUERY), the GridView selection is greyed-out (Enabled=False).
But if I press Make-Table in any case, I get a dialog asking for the new table name.
I cannot think of any SQL statement, with or without errors, where Access does not somehow respond either with a filled-in grid or a dialog box asking for further information.
Maybe if I had more information, such as the SQL statement as shown in SQL View, I might be able to help you. Otherwise I can offer no further assistance.
Quick guess: Your source table name is misspelled.
here is my sql code, i wasnt able to get it to work -
SELECT [Part Number], [Code 1], [Quantity 1]
-
FROM [Master Table]
-
WHERE (([Code 1] IS NOT Null)
-
OR ([Quantity 1] IS NOT Null))
-
UNION ALL
-
SELECT [Part Number], [Code 2] AS [Code 1], [Quantity 2] AS [Quantity 1]
-
FROM [Master Table]
-
WHERE (([Code 2] IS NOT Null)
-
OR ([Quantity 2] IS NOT Null))
-
UNION ALL
-
SELECT [Part Number], [Code 3] AS [Code 1], [Quantity 3] AS [Quantity 1]
-
FROM [Master Table]
-
WHERE (([Code 3] IS NOT Null)
-
OR ([Quantity 3] IS NOT Null))
-
ORDER BY [Part Number];
-
Ah, you can't view a Union query in design view. If you're UNION query is returning results without a problem, then just save it and build a new query from it. This new query will be viewable in design view and you can use the make-table functionality
Oh, and I think your confusing it by trying to name your fields as preexisting field names. The column names will be pulled from the first query in the union, so you probably don't have to rename the columns in the rest of queries
No problem. I don't write a lot pure SQL, so this is more for my own info. Were there any issues with column names you gave to the second and third select queries in the UNION?
NeoPa 32,556
Expert Mod 16PB
For those of you relatively new to working directly in SQL (I expect the OP is already happy with his solution but you're also welcome to the knowledge of course), UNION queries (or any type of query that makes sense, but which Access doesn't handle in Design View) can also be handled, directly in SQL, by encapsulating it within a Sub Query ( Subqueries in SQL).
Sign in to post your reply or Sign up for a free account.
Similar topics
by: PMB |
last post by:
Thank you in advance for any and all assistance.
I'm trying to use a make table query to pull the last transactionID, so I
can use an append query to reset the transactionID to the next...
|
by: Oreo Bomb |
last post by:
I have a secured database that contains a Read-Only group. This group
has permissions to view reports, but cannot add, edit, or delete any
DB objects. One of the reports the group needs access to...
|
by: Dragon |
last post by:
When I run a make-table query, the results take over 1 minute to
return. The query is making a table that has 12,000 records in it.
If I run the make-table query ONLY to see the records that will...
|
by: Doc |
last post by:
Per earlier post, I am trying to save 'out' production data from a
program called Solomon - basically (I think) this was /is an Access/Sql
based program.
We are updating to different application...
|
by: Neil Robbins |
last post by:
I am trying to execute a make table query in my vb.net program. The db that
I am accessing is an Access 2000 format db. The SQL code that I am using has
been cut and pasted from the SQL View having...
|
by: ken |
last post by:
Hi,
I use this command to run a make table query without opening it...
CurrentDb.Execute "make table query name"
Access tells me that it can't execute a select query...? Its a make
table query...
|
by: MLH |
last post by:
How can I turn the following into a make-table query?
SELECT & " " & AS Recipient FROM
tblVehicleJobs INNER JOIN tblAddnlOwnrs ON tblVehicleJobs.VehicleJobID
= tblAddnlOwnrs.VehicleJobID WHERE...
|
by: vegak18 |
last post by:
Dear Experts,
I was was wondering if there was some way to specify output properties of a make table query. Specifically, I am haivng a problem with numbers being specified as text. while I...
|
by: Mourad |
last post by:
Hi All,
Is it possible to create a Make Table query in access (2.0 and 2003)
that creates the table into a SQL Server database?
Following the steps:
1- Create New Query
2- Set Query Type as...
|
by: Laurel |
last post by:
I am completely new to access. I have a make-table query that combines data from two/more tables, asks for a criteria, deletes the old table and produces a new table every time under the same name....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |