Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
select data from( select '10$2' as data union all select '10&2' union all select '--10.3' union all select '-10.3' union all select '-10.3.6' union all select '-10,3' ) as twhere data not like '%[^-0-9.]%' and len(data)-len(replace(data,'.',''))<2 and len(data)-len(replace(data,'-',''))<2