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 |  
                                    | ChapStarting Member
 
 
                                        30 Posts | 
                                            
                                            |  Posted - 2010-09-28 : 10:52:36 
 |  
                                            | I need to strip the _f and the extension from the following: 202232009001_f.jpg5052010001_f.jpg32802009001.jpg134782009001.jpgAny help is appreciated.George |  |  
                                    | ChapStarting Member
 
 
                                    30 Posts | 
                                        
                                          |  Posted - 2010-09-28 : 11:37:40 
 |  
                                          | Hi everybody I got it. You use the Charindex function in a substringEx:select substring(bookno, 0, charindex('_',bookno)) from #ON400ANDIMAGEFBThanksGeorge |  
                                          |  |  |  
                                |  |  |  |