A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Replace two fields into one



 
 
Thread Tools Display Modes
  #1  
Old September 20th, 2005, 02:52 PM
bladelock
external usenet poster
 
Posts: n/a
Default Replace two fields into one

I have three fields (all three text) in a table "a1", "a2" and "a3"
How can put all for a1 Plus (combine) a2 into a3 with a query?
Thanks
  #2  
Old September 20th, 2005, 02:57 PM
Ofer
external usenet poster
 
Posts: n/a
Default

Try this

Select a1,a2,a3,a1 & " " & a2 & " " & a3 as CombineA From TableName

I added a space between the fields, if you dont want the space then

Select a1,a2,a3,a1 & a2 & a3 as CombineA From TableName

--
I hope that helped
Good luck


"bladelock" wrote:

I have three fields (all three text) in a table "a1", "a2" and "a3"
How can put all for a1 Plus (combine) a2 into a3 with a query?
Thanks

  #3  
Old September 20th, 2005, 03:37 PM
bladelock
external usenet poster
 
Posts: n/a
Default

I put this into the query as an SQL statement:
Select Table1.a1,table1.a2,Table1.a3,Table1.a1 & Table1.a2 & Table1.a3 as
CombineA From Table;
I get:
Syntax error (missing operator) in query expression '& Table1.a2 & Table.a3'

"Ofer" wrote:

Try this

Select a1,a2,a3,a1 & " " & a2 & " " & a3 as CombineA From TableName

I added a space between the fields, if you dont want the space then

Select a1,a2,a3,a1 & a2 & a3 as CombineA From TableName

--
I hope that helped
Good luck


"bladelock" wrote:

I have three fields (all three text) in a table "a1", "a2" and "a3"
How can put all for a1 Plus (combine) a2 into a3 with a query?
Thanks

  #4  
Old September 20th, 2005, 03:56 PM
Amy Blankenship
external usenet poster
 
Posts: n/a
Default

Try

SELECT (A1 & A2 & A3) AS CombineA FROM Table;

HTH;

Amy

"bladelock" wrote in message
...
I put this into the query as an SQL statement:
Select Table1.a1,table1.a2,Table1.a3,Table1.a1 & Table1.a2 & Table1.a3 as
CombineA From Table;
I get:
Syntax error (missing operator) in query expression '& Table1.a2 &
Table.a3'

"Ofer" wrote:

Try this

Select a1,a2,a3,a1 & " " & a2 & " " & a3 as CombineA From TableName

I added a space between the fields, if you dont want the space then

Select a1,a2,a3,a1 & a2 & a3 as CombineA From TableName

--
I hope that helped
Good luck


"bladelock" wrote:

I have three fields (all three text) in a table "a1", "a2" and "a3"
How can put all for a1 Plus (combine) a2 into a3 with a query?
Thanks



  #5  
Old September 20th, 2005, 04:07 PM
Ofer
external usenet poster
 
Posts: n/a
Default

Try this
Select Table1.a1,table1.a2,Table1.a3, a1 & a2 & a3 as
CombineA From Table
--
I hope that helped
Good luck


"bladelock" wrote:

I put this into the query as an SQL statement:
Select Table1.a1,table1.a2,Table1.a3,Table1.a1 & Table1.a2 & Table1.a3 as
CombineA From Table;
I get:
Syntax error (missing operator) in query expression '& Table1.a2 & Table.a3'

"Ofer" wrote:

Try this

Select a1,a2,a3,a1 & " " & a2 & " " & a3 as CombineA From TableName

I added a space between the fields, if you dont want the space then

Select a1,a2,a3,a1 & a2 & a3 as CombineA From TableName

--
I hope that helped
Good luck


"bladelock" wrote:

I have three fields (all three text) in a table "a1", "a2" and "a3"
How can put all for a1 Plus (combine) a2 into a3 with a query?
Thanks

  #6  
Old September 20th, 2005, 04:20 PM
bladelock
external usenet poster
 
Posts: n/a
Default

It worked thanks

"Amy Blankenship" wrote:

Try

SELECT (A1 & A2 & A3) AS CombineA FROM Table;

HTH;

Amy

"bladelock" wrote in message
...
I put this into the query as an SQL statement:
Select Table1.a1,table1.a2,Table1.a3,Table1.a1 & Table1.a2 & Table1.a3 as
CombineA From Table;
I get:
Syntax error (missing operator) in query expression '& Table1.a2 &
Table.a3'

"Ofer" wrote:

Try this

Select a1,a2,a3,a1 & " " & a2 & " " & a3 as CombineA From TableName

I added a space between the fields, if you dont want the space then

Select a1,a2,a3,a1 & a2 & a3 as CombineA From TableName

--
I hope that helped
Good luck


"bladelock" wrote:

I have three fields (all three text) in a table "a1", "a2" and "a3"
How can put all for a1 Plus (combine) a2 into a3 with a query?
Thanks




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Merge Fields via VB.NET ben Mailmerge 5 June 21st, 2005 05:43 PM
Outlook contacts doesn't allow all fields from Excel? gnmcewen Contacts 0 January 9th, 2005 04:21 AM
Additional fields for form based parameter query/null fields geeksdoitbetter Running & Setting Up Queries 2 January 7th, 2005 10:05 PM
Populate fields in Form Header based on header fields in startup f Pat Dools Using Forms 0 January 7th, 2005 03:19 PM
Selecting Fields for Update Steve Daigler Page Layout 4 October 15th, 2004 02:13 PM


All times are GMT +1. The time now is 03:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.