Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
san3297
Starting Member
7 Posts |
Posted - 2010-08-10 : 13:47:42
|
| I have a table with data as followsCON1 TYPE 1 R11 R22 R32 Z12 Z23 Y13 Y2I dont have unique column to distinguish types of same origin(R,Z,Y).What i am looking for is to get dataCON1 TYPE4 R4 Z6 YLet me know if some one can guide with this query. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-10 : 14:04:38
|
| [code]SELECT SUM(CON1) AS CON1,LEFT(TYPE,1) AS TYPEFROM TableGROUP BY LEFT(TYPE,1)[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|