Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
wided
Posting Yak Master
218 Posts |
Posted - 2011-06-06 : 04:25:53
|
| helloi have a field looks like this:Invoice N°0603081 NameClient1Invoice N°0704071 NameClient2Invoice number N°0805082 NameClient3I want to extract only060308107040710805082i can't use substring, because the value not start in the same placethanks |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-06-06 : 05:07:10
|
| select SUBSTRING(fld,1,CHARINDEX(' ',fld)-1)from (select fld = replace(fld,'Invoice N°','') from tbl) a==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|