caradri Posted July 17, 2016 Share Posted July 17, 2016 i want to do this : declare @a nvarchar(30); set @a = 'ssssss\ar12rvds\aaabbbccddd'; /*some name for example. Equal to the board name from vBoard4 view */ set @a = SUBSTRING(@a, (charindex('\', @a))+1,LEN(@a)) ; /*cut "ssssss\" */ set @a = SUBSTRING(@a, (charindex('\', @a))+1,LEN(@a)) ; /*Cut ar12rvds */ select @a as result; /* return aaabbbccddd only /* o each name in SELECT id, Name FROM namesTB how i do that? Link to comment Share on other sites More sharing options...
justsomeguy Posted July 18, 2016 Share Posted July 18, 2016 You can use those functions in the select list (most of them, not all functions available in stored procedures can be used in a normal query). Instead of selecting just the name, select the return value from transforming the name using whatever algorithm you want to use. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now