OrCREATE TABLE #myTable99 (Col1 varchar(256))GOINSERT INTO #myTable99SELECT 'Invoice 9999 for client ABC on 021909.pdf' UNION ALLSELECT 'Invoice 10000 for client DEF on 032309.pdf' UNION ALLSELECT 'Invoice 10001 for client GHI on 041209.pdf'GOSELECT SUBSTRING(Col1 , CHARINDEX(' ', Col1)+1 , (CHARINDEX(' ', Col1, CHARINDEX(' ', Col1)+1)) - (CHARINDEX(' ', Col1)+1))FROM #myTable99GODROP TABLE #myTable99GO
Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam