tag:blogger.com,1999:blog-495177919198719500.post6292085606234923837..comments2023-12-27T20:52:29.483-08:00Comments on Microsoft Sql Server Tutorials: Extract Numbers from a String using Sql Server 2005Suprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-495177919198719500.post-16832337319441502902009-12-27T22:12:15.876-08:002009-12-27T22:12:15.876-08:00Thanks Smitty. I checked the execution plan and it...Thanks Smitty. I checked the execution plan and it is faster.Bladenoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-57437843351967562242009-12-23T11:56:41.548-08:002009-12-23T11:56:41.548-08:00FYI... the method described here seems to work fas...FYI... the method described here seems to work faster than the one described here - http://blog.sqlauthority.com/2007/04/11/sql-server-udf-user-defined-function-to-extract-only-numbers-from-string/<br /><br />Just a heads up for anyone looking for performance.Smittyhttps://www.blogger.com/profile/13239637227336163778noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-87715175113302374992008-05-14T02:51:00.000-07:002008-05-14T02:51:00.000-07:00I need to select only rows where a character field...I need to select only rows where a character field contains exactly 4 numbers, blanks allowed but replaced and no alphabetic characters allowed. There are thousands of rows and I need to do this in one select. Can it be done without creating a user function or stored procedure?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-69001029092390241942008-04-24T22:41:00.000-07:002008-04-24T22:41:00.000-07:00Thanks for your comment. Check the answer over her...Thanks for your comment. Check the answer over here:<BR/><BR/>http://www.sqlservercurry.com/2008/04/how-to-check-if-string-contains-numbers.htmlSuprotim Agarwalhttps://www.blogger.com/profile/08349831623922214390noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-83667921583722021062008-04-24T12:52:00.000-07:002008-04-24T12:52:00.000-07:00For example if i have the following string:'abcde9...For example if i have the following string:<BR/><BR/>'abcde99jtk'<BR/><BR/>I need to check if the string above has a number. If so, it returns TRUE. If not, it returns FALSE.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-91077377006068426542008-04-23T19:53:00.000-07:002008-04-23T19:53:00.000-07:00Hi, Can you give an example of how do you percieve...Hi, Can you give an example of how do you percieve a mixed string to be. The solution does contain a string that has numbers and characters. I would need you to explain me your requirement with some details.Suprotim Agarwalhttps://www.blogger.com/profile/08349831623922214390noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-14272244622600976322008-04-23T05:25:00.000-07:002008-04-23T05:25:00.000-07:00How can I use this to check if the mixed string do...How can I use this to check if the mixed string does indeed have numbers in it?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-1281615261686075692008-04-22T19:30:00.000-07:002008-04-22T19:30:00.000-07:00Hi, Did you try that query?If you have a string mi...Hi, Did you try that query?<BR/><BR/>If you have a string mixed with alphabets and numbers, somethng like this "'This string contains 5 words and now 9 words'" and now you want to extract only the numbers 5 and 9, use the query shown above.Suprotim Agarwalhttps://www.blogger.com/profile/08349831623922214390noreply@blogger.comtag:blogger.com,1999:blog-495177919198719500.post-58204320287582574362008-04-22T05:35:00.000-07:002008-04-22T05:35:00.000-07:00i did not understand a damn thing what r u talk'n ...i did not understand a damn thing what r u talk'n aboutAnonymousnoreply@blogger.com