|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to select a single varchar combined by many rows?about that. For example, My client have a number of companies, each company has its own phone number. Each phone number is store in row(not fixed number of row). Let say, there are 4 phone number (row) as 852 3745 3844 86 1235 4578 88 481 2356 759 97 124 457 4134 How can I select a single cell like "852 3745 3844, 86 1235 4578, 88 481 2356 759, 97 124 457 4134" OR Select it as single row with four columns? Thank you. Why can't the presentation tier do this?
http://databases.aspfaq.com/general/how-do-i-concatenate-strings-from-a-column-into-a-single-row.html Show quote "Cylix" <cylix2***@gmail.com> wrote in message news:1158289745.966655.151410@p79g2000cwp.googlegroups.com... > This question is quite common in my query, but I still have no idea > about that. > > For example, > My client have a number of companies, each company has its own phone > number. > Each phone number is store in row(not fixed number of row). > > Let say, there are 4 phone number (row) as > 852 3745 3844 > 86 1235 4578 > 88 481 2356 759 > 97 124 457 4134 > > How can I select a single cell like "852 3745 3844, 86 1235 4578, 88 > 481 2356 759, 97 124 457 4134" > > OR Select it as single row with four columns? > > Thank you. > Thanks Aaron,
The SQL is really interest and advance for me. It do really help. Cylix wrote:
Show quote > This question is quite common in my query, but I still have no idea > about that. > > For example, > My client have a number of companies, each company has its own phone > number. > Each phone number is store in row(not fixed number of row). > > Let say, there are 4 phone number (row) as > 852 3745 3844 > 86 1235 4578 > 88 481 2356 759 > 97 124 457 4134 > > How can I select a single cell like "852 3745 3844, 86 1235 4578, 88 > 481 2356 759, 97 124 457 4134" > > OR Select it as single row with four columns? > > Thank you.
Other interesting topics
|
|||||||||||||||||||||||