Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / December 2005

Tip: Looking for answers? Try searching our database.

Make Table Query - New Field Name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Racer57 - 07 Dec 2005 16:08 GMT
In a Make Table Query, how can I have the fields in the new table be
different from the field name in the source table? For example - Expr1 in the
source table should be Name in the destination (new) table.
Allen Browne - 07 Dec 2005 16:27 GMT
In your query, alias the fields with the name that you want. You do that by
typing a suitable name in front of the field name in the Field row, and add
a colon.

For example, if you currently have:
   Expr1: [FirstName] & " " & [Surname]
use:
   FullName: [FirstName] & " " & [Surname]

Or if you want to call the City field Suburb:
   Suburb: City

BTW, don't use Name as a field name. Nearly everything in Access has a Name
property, so Access will get confused between the name of the field and the
value of the name field on the form, for example.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> In a Make Table Query, how can I have the fields in the new table be
> different from the field name in the source table? For example - Expr1 in
> the
> source table should be Name in the destination (new) table.
Racer57 - 08 Dec 2005 12:53 GMT
Worked great - Thanks!

> In your query, alias the fields with the name that you want. You do that by
> typing a suitable name in front of the field name in the Field row, and add
[quoted text clipped - 16 lines]
> > the
> > source table should be Name in the destination (new) table.
Ofer - 07 Dec 2005 16:49 GMT
When you look at the query SQL youll see

Select Expr1, Expr2 from tablename

You can change it to
Select Expr1 as NewName1, Expr2 As NewName2 From TableName
=======================================
Or if you have something like
Select Field1 * Field2 As Expr1 From TableName

You can chenge it to
Select Field1 * Field2 As NewName From TableName
Signature

Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck

> In a Make Table Query, how can I have the fields in the new table be
> different from the field name in the source table? For example - Expr1 in the
> source table should be Name in the destination (new) table.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.