Skip to main content

Posts

Showing posts with the label Substring SQL function

How to use left, right & substring in SQL with String Dynamic Length

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 http://www.bestvisualization.com