Merging Two Fields In SQL

Ripley

Registered User.
Local time
Today, 00:50
Joined
Aug 4, 2006
Messages
148
Hi, this is really puzzleing me!

What i want to do is take a field from one table and a field from another and join them together to make a single field.

I know this wouldnt work in practice without selection statements etc so only one field is selected, but if you could just help me on this code i would be greatful!

For example, assuming that the tables tblMyDatatable, and tblOtherData consists only of one record with each containing a letter of "y" then:

Code:
SELECT [TheData FROM tblMyDatatable] & OtherData AS ThisQuery
FROM tblOtherData;

Should produce the following:

ThisQuery
yy

It dosent! Can anybody help?
 
First use the Query Builder to join the two tables.
 
If you do what RuralGuy says above, you will come up with this:
'
SELECT Table1.T1Field1, Table2.T2Field1, [T1Field1] & "/" & [T2Field1] AS Expr1
FROM Table1 INNER JOIN Table2 ON Table1.Table1ID = Table2.Table2ID;

Regards
Mark
 

Users who are viewing this thread

Back
Top Bottom