Experts Exchange connects you with the people and services you need so you can get back to work.
Declare @s varchar(100),@result varchar(100)set @s='as4khd0939sdf78'
@result=@result+case when number like '[0-9]' then number else '' end from
select substring(@s,number,1) as number from
select number from master..spt_values where type='p' and number between 1 and len(@s)
) as t
) as t
select @result as only_numbers
Open in new window
Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
select left(invoice_identifiers, patindex('%[0-9]%', invoice_identifiers)-1) as invoice_letters
, substring(invoice_identifiers, patindex('%[0-9]%', invoice_identifiers), len(invoice_identifiers)) as invoice_numbers
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.