Dear Reader
Here is an example for how to use Left, right and substring function in SQL
Using Right with Reverse String
SELECT RIGHT([String],CHARINDEX('%',REVERSE([String]),0)-1)
Using Left with String
select Left([String],CHARINDEX('%',[String],0)-1)
Using SubString with String
select Substring([String],0,CHARINDEX('%',[String],0))
Regards
Rashid Imran Bilgrami
Here is an example for how to use Left, right and substring function in SQL
Using Right with Reverse String
SELECT RIGHT([String],CHARINDEX('%',REVERSE([String]),0)-1)
Using Left with String
select Left([String],CHARINDEX('%',[String],0)-1)
Using SubString with String
select Substring([String],0,CHARINDEX('%',[String],0))
Regards
Rashid Imran Bilgrami
Comments
Post a Comment
Thanks for the Comments , Your review will display soon