Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table to table plus a concatenate

Status
Not open for further replies.

sinbadly

Technical User
Mar 16, 2006
126
GB
Table1 has the same rows as Table3.

I want to put all the stored data in Table1 into Table3.

I want to concatenate one field from Table2 into Table3 so as not to lose any details transferred from Table1. (I want to add it to the text from Table1.)

Guidance would be appreciated.
 
welcome back, sinbadly

i wonder if we're going to solve it this time ;-)

could you give some sample rows from each table so that we can understand what you're trying to do

r937.com | rudy.ca
 
Sorry this has dragged on ….

What I would like to achieve is this:


Table 1
Head: Something happened
Sub: Shock, horror at seaside
Story: Four people were washed out to sea ….

Table 2
Head: Something happened
Sub: Shock, horror at seaside
Story: Later the parents of one of the four people lost in the tidal wave told our reporter ….

Table 3
Head:
Sub:
Story:

So I put all of Table1 into Table3.
All I want from Table2 is to tack the text in 'story' onto (as an addition to, to concatenate) the text transferred to Table3.

So Table3 will have from Table1 the heading, sub, the story, and ADDED onto the story will be the text from 'story' in Table2.

Hope this is clear now.
 
you're saying each of your tables has only one row???

no wonder you did not understand what i was talking about in your previous thread about doing a join

i think you should either redesign those tables, or just use text files instead of a database

r937.com | rudy.ca
 
r937, you used to be such a helpful fellow.

I may well use the wrong term. I use Access as well as sql so I might be stumbling over the right name for rows or fields. I work under pressure and I've not had this trouble before for experts here on Tek-Tips understand and actually want to help.

I'm showing the fields/rows in each table that are involved in what I wish to do here. The tables have specific uses in relation to certain pages in the website, and of course contain many fields/rows.

All I want to know is how to concatenate in this particular case. For experts like Tony Groves and JPAdie, it must be the simplest thing. You used to be great at this too.
 
thanks for the kind words, and pardon me for trying to obtain clarity in understanding your problem

if you want me to keep trying, please do a SHOW CREATE TABLE for each of your tables

if you want to go it alone, the concatenation function in MySQL is CONCAT()

good luck

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top