473,666 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating Field Names in Tables using data definition query?

1 New Member
Is it even remotely possible to update field names to the correct field name for the same table using a data definition query? We have a utility that spits out data in an Access database for use in reporting (can't really go into too much detail...it's a legal application). Anyway, I always have to customize the field names every single time a production is to go out. The original field names are always the same, and the field names I want to change them to are always the same on a case by case basis. I would love to figure out how to customize the query so that it automatically updates the field names...this would cut down a lot of time spent on changing each field name individually.

And yes, I am inexperienced in SQL but I can understand the logic when reading the statements (I just can't spit out the lingo).

TIA,
Jacey
Jul 18 '08 #1
1 4675
Stewart Ross
2,545 Recognized Expert Moderator Specialist
In your circumstances I would devise queries which alias the fields concerned, giving them the names you want them to have, then use these for export/reporting/further processing.

Place a table on the Access Query Editor grid then add some fields to the grid. You can use alternate names for the fields (known as aliasing) by providing the new name for the field where the existing name shows on the grid, like this:
Expand|Select|Wrap|Line Numbers
  1. Preferred Name: Old Name
In the underlying SQL itself aliasing is done using the As operator:

Expand|Select|Wrap|Line Numbers
  1. SELECT [Old name] AS [Preferred Name], [Another hard to read one] AS [Easily Read Name], ... , 
  2. FROM [Your table]
  3. WHERE somecondition holds
  4. ORDER BY some field
As for replacing field names automatically - wouldn't recommend that you interfere with table definitions, although it is technically possible. Use an aliased query instead.

There are other approaches, such as using mapping tables to map one field to another, but these would require a lot of thought about what you want to do and how you want to do it.

I think you can achieve a lot simply by renaming the fields in suitable queries that you can set up for specific purposes.

-Stewart
Jul 19 '08 #2

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

Similar topics

3
35807
by: Thierry B. | last post by:
Hi, from SQL*Plus, i use: DESCRIBE MyTable and I get this result (example): Nom NULL ? Type ----------------------------------------- -------- ------------------------
2
1963
by: Eric G | last post by:
Hello, I'm using A2K and would like to update our school back-end server file. I've taken a copy of it home because I was having some trouble updating it at school. I basically want to add 30 some odd names to the end of a student list. Can someone please tell me the steps that I should follow?
13
3514
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to make a query that selects from a table as desribed below .. I have a table (Volunteer) that has a member field (memnumber) and a number of fields that are headed in various categories and are yes/no formated
1
1860
by: Chris Jackson | last post by:
I'm a novice Access user and am not sure how to solve the following problem. Any help with the following would be greatly appreciated! I have two tables with identical structures, the first holds the data input for a questionnaire, the second holds the scores from the questionnaire, to move the scores I've set up 2 action queries, the first appends the record to the second table, the second action query 'updates' the results by...
1
2713
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy for updating these tables via an ftp site: 1) Post a .mdb file to our ftp web site that contains the updated tables. My App code connects to the ftp site and gets the file name for any update files on the site. I already have code to do this...
9
3109
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to be inserted into a standard web address in the table (the filed name is link) in ddw1 Example address ---
5
1979
by: JimmyKoolPantz | last post by:
Situation: I am writing a program that opens up a data file (file ext .dbf), imports the information into a dataset. The program also, searches through the dataset for key words ("company names") and then displays all records with company names in a datagridview. Once the information has been binded to the datagridview control, I allow the user to select all records that are not companies, for example, during the search the key word...
11
10292
by: Tim Hunter | last post by:
Hi I am using WinXP and Access 2003 Is it possible to store the field names of a table in an array and then loop through the array and update the table using the field names stored in the array? I can't figure out the coding to accomplish this. I have an Excel application that is a monster and it has become too much to maintain and test. I didn't write it but i support it. I am trying to convert this application to Access and it is not as...
4
8864
by: dreaken667 | last post by:
I have a MySQL database containing 16 tables of data. Each table has a different number of columns and there are few common field names accross tables. I do have one master table with which I connect the tables together with various queries using a unique id. My task is to generate reports from these tables dynamically. The user will select the data they want to see and the script will export a spreadsheet containing this data. I've got the...
0
8454
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8362
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8560
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6200
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5671
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.