SQL Server Forums
Profile | Register | 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
 New Topic  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  
 New 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.28 seconds. Powered By: Snitz Forums 2000