![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hello, I have a table with a "name" field and another field for ex : "position" that is the grouping criteria : Example of the table content : Name | Position =========================== Fred | 1 Edouard | 3 Seb | 1 I would like to make a request that returns this recordset : Fred + Seb | 1 Edouard | 3 That's to say, a SQL that groups AND concats (with '+' here) the names having the same position number. In fact, is it possible to group AND concat on a text field in a SQL request ? Thanks for any help Best regards Fred | |||
|
| | #2 | ||
| Fred schrieb: > Hello, > > I have a table with a "name" field and another field for ex : "position" > that is the grouping criteria : > Example of the table content : > > Name | Position > =========================== > Fred | 1 > Edouard | 3 > Seb | 1 > > > I would like to make a request that returns this recordset : > > Fred + Seb | 1 > Edouard | 3 SELECT GROUP_CONCAT(Name SEPARATOR ' + ') FROM table GROUP BY Position; Stefan | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: concat, fields, group, statement, text, using |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 where clause in same statement Mysql 4.2 | Xavier Houppertz | Database | 3 | 05-31-2007 7:40 PM |
| Export MS Access tables with random autonumber fields to MySQL | GGL | Database | 0 | 05-31-2007 7:39 PM |
| Right group? | Rolf Barbakken | MSN questions | 0 | 05-28-2007 12:18 AM |
| Quickform: how to check two fields in one function using registerRule() | l Burnerheimerton | Pear | 1 | 05-20-2007 5:34 PM |
| Quickform: how to check two fields in one function using registerRule() | l Burnerheimerton | Pear | 0 | 05-20-2007 5:34 PM |
| Featured Websites | ||||
|