Okay, this is what I have so far.
I was trying to do a Union Query, this is the SQL information I have. - ELECT TRANSFORMERS.CoNo,
-
TRANSFORMERS.SerialNo,
-
TRANSFORMERS.KVA,
-
TRANSFORMERS.Mfg,
-
TRANSFORMERS.PriVoltsHigh,
-
TRANSFORMERS.PriVoltsLow,
-
TRANSFORMERS.SecVoltsHight,
-
TRANSFORMERS.SecVoltsLow
-
FROM TRANSFORMERS INNER
-
UNION ALL
-
SELECT TRANSFORMERS.CoNo,
-
TRANSFORMERS.SerialNo,
-
TRANSFORMERS.KVA,
-
TRANSFORMERS.Mfg,
-
TRANSFORMERS.PriVoltsHigh,
-
TRANSFORMERS.PriVoltsLow,
-
TRANSFORMERS.SecVoltsHight,
-
TRANSFORMERS.SecVoltsLow
-
FROM TRANSFORMERSNew;
I keep getting an error "Syntax error in JOIN operation"...did I miss something?
Help...
5 1721
Could it be that the first word in your SQL statement says ELECT when it should say SELECT?
INNER is the keyword for a type of JOIN. I've never heard of an INNER UNION ALL.
NeoPa 32,556
Expert Mod 16PB
Karyna,
Notice I reformatted the SQL code for you as well as adding the [ CODE ] tags. I wonder how so many members seem to expect us to be able to read their SQL when they just dump it in a mess without any sort of formatting. This takes no special expertise, simply a little time and effort. I don't mean to bust your chops on this, but I really just don't get how this happens so often. As this is your first post I won't make a big deal out of it (in truth I want to leave it for others to find as they search through, rather than direct it specifically at yourself).
If you re-examine it now, you will see a number of mistakes (especially if I point them out to you) : - As mentioned before, the first character is missing from the SELECT on line #1.
- On line #9 there is the remnants of an INNER JOIN statement. I guess someone decided to use the UNION ALL instead but failed to clear away the INNER JOIN fully.
- The second SELECT query in the UNION (starting at line #11) refers to the wrong table. All the lines from #11 to #18 should be referring to TRANSFORMERSNew rather than TRANSFORMERS.
Welcome to Bytes!
I will make sure to put code in a proper format.
I do have the "S" in the code...but I did not realize that INNER was not needed.
Is there a specific book on queries in Access, that anyone can recommend.
Thank you to all who responded.
Merry Christmas!
@karynaweiss
I would advise using Google to assist you. There is a plethora of information out there. Just search for: "Access Query Basics" for example.
Here is one to get started. Query Basics
Hope this helps,
Bender
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Diane Yocom |
last post by:
I have an ASP intranet application that is required to produce Word
documents merged with data from a database. I originally looked at
automating Word's mail merge capabilities, but nixed that...
|
by: EasyRider41 |
last post by:
I am trying to merge to scripting samples I for on a source code web
site and having limited luck. Then first one is called Zebra Tables
witch colors alternate rows of a table to look beter. The...
|
by: marklawford |
last post by:
Hi guys,
I'm getting the following error message when trying to run a MERGE
statement I'm putting together. The syntax looks right to me But i must
be missing something. The "srce" table...
|
by: Sheila |
last post by:
I have set up a Word mail merge document of the type Directory which
allows me to display all of the records on a single page rather than
putting each record on a separate page. It uses a...
|
by: UDBDBA |
last post by:
Hi All:
I need some clarification on a MERGE statement. The database is on V8
FP12 (AIX) 64bit.
The source table is tableA.
The target is a View "FACT" with UNION ALL because of the 512 Gig...
|
by: crealesmith |
last post by:
Firstly, I have no problem with mail merging to Word, VB code for that
works perfectly.
On one mail merge I need to merge 15 fields of data that are from 3
seperate records.
The 3 records are all...
|
by: JK |
last post by:
I saw Danny Lesandrini's article on Database Journal
(http://www.databasejournal.com/features/msaccess/article.php/2236471)
on how to merge tables from identical databases. This is exactly what...
|
by: barny |
last post by:
Hi all,
I have been trying to merge two access tables together all morning with no succsess.
In table one I have
Account Number|Return1|Return2|Return3|
M1234567 | P9832 | Q1234 | P4322 |...
|
by: coolhand729 |
last post by:
Okay, this is not your normal two table query (at least it doesn't seem that way to me).
I'm using Access 2000 on Windows XP.
I have two tables in access. One is a table with addresses of club...
|
by: acctman |
last post by:
Hi i need help with a sql query. i have two tables Product and tblWebProduct, i need to merge the two tables together only copying the rows IF the stockcodes match (Product.StockCode &...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
| |