select left(@str, patindex('%[^0-9]%', @str+'.') - 1)
More Related Contents:
- How to create a specific SQL Server stored procedure? [closed]
- Creating stored procedure getting Incorrect syntax near the keyword ‘Declare’
- Should I use != or for not equal in T-SQL?
- How to update two tables in one statement in SQL Server 2005?
- Conversion failed when converting date and/or time from character string while inserting datetime
- INSERT statement conflicted with the FOREIGN KEY constraint – SQL Server
- Foreign Key to non-primary key
- Difference between left join and right join in SQL Server [duplicate]
- Is the NOLOCK (Sql Server hint) bad practice?
- Creating table names that are reserved words/keywords in MS SQL Server [closed]
- Dynamic SQL – EXEC(@SQL) versus EXEC SP_EXECUTESQL(@SQL)
- Fastest way to remove non-numeric characters from a VARCHAR in SQL Server
- Get all dates between two dates in SQL Server
- Run all SQL files in a directory
- Rename column SQL Server 2008
- Compare DATETIME and DATE ignoring time portion
- Fastest way to determine if record exists
- unresolved reference to object [INFORMATION_SCHEMA].[TABLES]
- Meaning of square brackets [] in MS-SQL table designer? [duplicate]
- Selecting first row per group
- How do I specify date literal when writing SQL query from SQL Server that is linked to Oracle?
- SQL Server Convert integer to binary string
- How to find column names for all tables in all databases in SQL Server
- SQL update trigger only when column is modified
- Passing dynamic order by in stored procedure
- How do I compare 2 rows from the same table (SQL Server)?
- How do I change db schema to dbo
- Sql Server : How to use an aggregate function like MAX in a WHERE clause
- How to get the next number in a sequence
- How to insert into a table with just one IDENTITY column?