Change string in SQL Server to abbreviate

Posted by jeff on Stack Overflow See other posts from Stack Overflow or by jeff
Published on 2010-03-11T21:22:45Z Indexed on 2010/03/11 21:39 UTC
Read the original article Hit count: 231

Filed under:
|
|

How do I return the everything in a string from a sql query before a certain character?

My data looks like this:

HD TV HM45VM - HDTV widescreen television set with 45" lcd

I want to limit or truncate the string to include everything before the dash.

So the final result would be "HD TV HM45VM"

© Stack Overflow or respective owner

Related posts about sql

Related posts about tsql