string-math

TSQL - Locating first occurrence of value in a string

I need to run a simple select statement for a column called AddrZip to show all records that contain '1/2 ' after the first space in the column. In Access 2007 it would be: **Left([Names],InStr(1,[Names]," ")-1), but can't find out how to do it in SQL 2005. All help will be appreciated. ...

Replace part of text in a dynamic string

Hello, Let’s take this string has an example: D:/firstdir/Another One/and 2/bla bla bla/media/reports/Darth_Vader_Report.pdf I want to cut the first part of the path: D:/firstdir/Another One/and 2/bla bla bla And replace it with **../**, and keep the second part of the path (media/reports/Darth_Vader_Report.pdf) If I knew the leng...