Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 extract extension from list
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Chap
Starting Member

USA
30 Posts

Posted - 09/28/2010 :  10:52:36  Show Profile  Reply with Quote
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

USA
30 Posts

Posted - 09/28/2010 :  11:37:40  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000