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 |
|
mrm23
Posting Yak Master
198 Posts |
Posted - 2010-07-21 : 05:19:13
|
| Hi All,I have a scenario like this:the user can create his own object from available templates. But here there can be hundreds of objects with the same name or which begin with the same name.for example , my table has one and half lakh rows.the data is somewhat like:createhouseaddcurtain...but the data will actually be like if you makeselect * from table having name like create% you will get 100-150 rows.they all begin with create but they are diff. like createhouse, createpool etc....now we need to group these data for our report purpose. we are thinking to group all these create% stuffs as one gp, add% stuff as second group and so on...can we write query for this? |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-07-21 : 05:32:09
|
| please post some sample data. and what is your desired output. |
 |
|
|
mrm23
Posting Yak Master
198 Posts |
Posted - 2010-07-21 : 05:48:12
|
| My data is like this:addlotsize 30xaddlotsize 32xaddlotsize 35addlotsize 40addlotsize 40xaddlotsize 42addlotsize 50ADDTRAITAddtraitaddtraitaddtrait 'bookwaddtrait 'braveaddtrait 'greataddtrait 'greenaddtrait 'hopeaddtrait 'hopeladdtrait 'insaaddtrait 'lovesaddtrait 'natuNow i must get data like:addlotsizeaddtraitI.e i have tried to figure out what types are available, ignoring how many times they are repeating.so my one and half lakh will come down to 180-200 rows. |
 |
|
|
|
|
|