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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 extract extension from list

Author  Topic 

Chap
Starting Member

30 Posts

Posted - 2010-09-28 : 10:52:36
I need to strip the _f and the extension from the following:
202232009001_f.jpg
5052010001_f.jpg
32802009001.jpg
134782009001.jpg

Any help is appreciated.



George

Chap
Starting Member

30 Posts

Posted - 2010-09-28 : 11:37:40
Hi everybody I got it. You use the Charindex function in a substring
Ex:
select substring(bookno, 0, charindex('_',bookno)) from #ON400ANDIMAGEFB

Thanks


George
Go to Top of Page
   

- Advertisement -