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 |
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2003-02-18 : 21:14:49
|
| I have the following records. 613501.prt.36x30.prt.3761501.prt.1761501.prt.unknownI want to select only the text before the .prt% so I end up with:6135016x30761501761501Is this possible?Thanks in Advance!Lane |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-02-18 : 21:18:54
|
| SELECT Left(myCol, CharIndex('.prt', myCol)-1)FROM myTable...or...SELECT Substring(myCol, 1, CharIndex('.prt', myCol)-1)FROM myTable |
 |
|
|
|
|
|