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 |
|
sanlen
Starting Member
29 Posts |
Posted - 2008-11-20 : 23:16:28
|
| Hi All,i have the value as below:1 A2 B3 C3 D3 E1 F2 G1 HI want to disply just only as below:1 A1 F1 Hor 2 B2 GCould you please advise? Thanks you very much for your time.Best Regard,SANLEN |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-11-20 : 23:46:43
|
| SELECT * FROM yourtable WHERE SrNo = 1 ORDER BY description;Note:SrNo = 1,2,3,1,5,6,7Description = a,b,c,d,e,f |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-21 : 01:43:16
|
Make a procedure as belowCREATE PROC GetData@ID intASSELECT *FROM YourTableWHERE ID=@IDORDER BY CharFieldGO then call it with your reqd id to get only values you need likeEXEC GetData 1 gives you1 A1 F1 HEXEC GetData 2 gives you2 B2 G... |
 |
|
|
|
|
|