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.
Hi friends, Here is the table I'm doing the select on
select name, pwd from testname(varchar) pwd(varchar)-----------------------------------Mary At connectselect CAST(datalength(name) AS VARCHAR) + substring (pwd,3,6) from test;4 conne
But I need the result to be '4 con' (length of test.name + 3rd to 6th character in test.pwd inluding the space) Please help...Thank you
Kristen
Test
22859 Posts
Posted - 2010-08-25 : 10:46:56
From documentation:SUBSTRING(string, start, length)notSUBSTRING(string, start, end_position)