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 |
|
jag17
Starting Member
4 Posts |
Posted - 2008-02-01 : 09:09:43
|
| HiI have a table with one columnShop Name---------------123 Shop#56 Shop@ShopAstar ShopBest ShopI want to write a sql select statement and produces the following resultShop Name---------------123 Shop#56 Shop@ShopPlease help me on thisCheers-Jag |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-02-01 : 09:32:59
|
| You probably will find this helpful:-http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81901 |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-02-01 : 09:35:31
|
| CREATE TABLE #temp(ID INT,someText VARCHAR(100))INSERT INTO #tempSELECT 1,'sssss'UNIONSELECT 2,'1sss'UNIONSELECT 3,'dddd'UNIONSELECT 4,'2dddd'UNIONSELECT 4,'#dddd'SELECT ID,someText FROM #temp WHERE substring(someText,1,1) NOT like '%[a-z]'DROP TABLE #tempJack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-01 : 09:43:54
|
| [code]select * from( select '123 Shop' as ShopName union allselect '#56 Shop' union allselect '@Shop' union allselect 'Astar Shop' union allselect 'Best Shop' ) twhere ShopName not like '[a-z]%'[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|