473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

"Query must have one destination field" error when opening a Table?

newnewbie
Please help me with this mystery. I did the Union query to put together some tables...it ran once, showing me the data. Tried to run it for the second time and it could not find one of the tables. I wanted to look at one of the other tables....and it gives me a message " Query must have at least one destination field". I am trying to open a Table. Double clicking on it.
[IMG]C:\Documents and Settings\lskalska\Desktop\table Mystery.jpg[/IMG]

Any idea, anyone?
Apr 14 '09 #1
10 8862
JustJim
407 Expert 256MB
Hi,
I'm a bit worried about what you mean by "put together some tables". Can you open your Union query in design view, change the view to SQL and post the SQL here (using the code tags)? That will make it easier to see what may have happened.

Jim
Apr 14 '09 #2
Jim,
Here's the Union query code. But again, I just tried looking at a table. Union query was closed at that moment.

Expand|Select|Wrap|Line Numbers
  1.  Select *, #11/01/2007# as Period
  2. from HR_0711
  3. Union All 
  4. Select *, #12/01/2007# as Period
  5. from HR_0712
  6. Union All 
  7. Select *, #01/01/2008# as Period
  8. from HR_0801
  9. Union All 
  10. Select *, #02/01/2008# as Period
  11. from HR_0802
  12. Union All 
  13. Select *, #03/01/2008# as Period
  14. from HR_0803
  15. Union All 
  16. Select *, #04/01/2008# as Period
  17. from HR_0804
  18. Union All 
  19. Select *, #05/01/2008# as Period
  20. from HR_0805
  21. Union All 
  22. Select *, #06/01/2008# as Period
  23. from HR_0806
  24. Union All 
  25. Select *, #07/01/2008# as Period
  26. from HR_0807
  27. Union All 
  28. Select *, #08/01/2008# as Period
  29. from HR_0808
  30. Union All 
  31. Select *, #09/01/2008# as Period
  32. from HR_0809
  33. UNION ALL Select *, #10/01/2008# as Period
  34. from HR_0810;
  35.  
Apr 15 '09 #3
JustJim
407 Expert 256MB
Holy Snapdragons, Batman! Perhaps you'd better back up a step and explain what the purpose of the database application is, and what are all these HR_**** tables and what are the fields in them.

I think we might have a slight normalisation problem, but if you explain what it is that your are trying to achieve, we'll go from there.

Jim
Apr 15 '09 #4
Hehehe :) Well, those are HR tables, headcount tables. Each month I get a new spreadsheet with current headcount, name it HR_YYMM and load into access....All I am trying to do is to put all these HR tables together to see which title, etc each associate was at a certain period. That's it. It's not even that important cos I could just open each one and copy and append each month in Excel or something, but some of them I cannot open due to this "query must have at least one destination field". Now, even that does not prevent me from getting the data together because we in finance are hoarding files in all kinds of locations, so I can recover them :) But! This is the second time I am getting this weird error within Access while trying to open a table and it perplexes me.

Fields in the tables are:
EMPLID
FILE_NBR
NAME
ORIG_HIRE_DT
WORK_LOCATION
WORK_LOCATION_DESCR
REPORTING_LOCATION
LOCATION DESCR
DEPT DESCR
JOBCODE
JOBTITLE
FULL_PART_TIME
REG_TEMP
ANNUAL_RT
HOURLY_RT
GRADE
HOME_DEPARTMENT
DATA_CONTROL
COMPANY
REGION
FTE
P&L
The fields are all the same in all tables.

The database was recently converted to 2007 format. My guess is that's what caused some stuff go wacky. I am not sure. Also, is there a limit on how many tables/rows you can Union? Each HR table is around 12000 rows.

You already hinted on some normalization stuff and that's what I'm going to look up now.
I love this forum!
Apr 15 '09 #5
NeoPa
32,556 Expert Mod 16PB
Check Normalisation and Table structures for Normalisation info.

NB. Posting images cannot be done on a web site with references to files on your own machine. It may work for you, but you're the only person who will ever see it as anything other than an empty box.
Apr 15 '09 #6
NeoPa
32,556 Expert Mod 16PB
@newnewbie
Reading this I have no idea what you're saying you're having problems with.

If you could explain what happens when, in some sort of order, it may be clearer what you're falling over.

As to the storage of the data, I would strongly advise setting up a single table with all the data in. The date of the data is an attribute, and not something that indicates a different dataset. Simply add this into the record structure, then put all the data in together.
Apr 15 '09 #7
Thank you all, I will look at the Normalization post NeoPa referred me to and will set a single table with the data.
Thank you.
Apr 15 '09 #8
NeoPa
32,556 Expert Mod 16PB
Do you get why no-one's seeing your pictures?

I noticed you'd done the same thing before, and realising it will always show as visible to you, I thought it advisable to explain.
Apr 15 '09 #9
I understand why but I do not know how to post it so that everyone sees it - if I post on flickr or similar web photo service then people will see it, right?
Thanks.
Apr 15 '09 #10
NeoPa
32,556 Expert Mod 16PB
As long as the link is set up properly yes. They should do.
Apr 15 '09 #11

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

Similar topics

17
by: black tractor | last post by:
HI there.. l was just wondering, if l place a "table" in the "editable region" of my template, will the text, graphics placed inside the this "table" MOVE BY ITSELF?? l mean, recently l had a...
2
by: Ellen Manning | last post by:
Using A2K. In my table I have the field "Grant" which can have a value or be null. I have a query that counts the number of records and has a Where clause on the Grant field. The query won't...
3
by: screenwriter776 | last post by:
Hi, folks - Perhaps you could help me with a search form I am building. I have a table with a field in it. I want to return dates inside two parameters the user enters into a search form:...
8
by: Matt | last post by:
Hi all, Thank you for taking the time. I have a database with 45 tables on it. 44 tables are linked to a main table through a one to one relationship. My question is, is there no way i can...
1
by: Charlie | last post by:
Hi: I'm using the HTML File Field control as a file picker for uploading files to a SQl Server image field. When page posts back to initiate upload, if file is small (under about two megs) all...
5
by: Dave Smithz | last post by:
Hi there, Been working on an evolving DB program for a while now. Suddenly I have come across a situation where I need to update a table based on a group by query. For example, I have a table...
2
by: NowItsWhatever | last post by:
In query DESIGN view, how do I automatically "fit" the columns in the table/field grid to the lengths of the table and field names (including any functions applied to the fields). I am not talking...
11
by: gnortenjones | last post by:
I have a linked table (to an oracle db), and I am trying to run a simple update query against it to change some data, but I am getting the following error: "...didn't update 0 fields due to a type...
4
by: Mike D | last post by:
OS: Windows XP Professional Microsoft Access 2003 I am trying to update a table in my DB from a tempory table. I need to ensure that if records in the main table match records in the temp...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
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...
0
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...
0
jinu1996
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...
0
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...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.