|
Prev: Selecting from a table where my unique Key is not their unique key.
Next: how to use SUM [RESOLVED]
From: littleccguy on 22 Jul 2008 13:14 Using SQL 2000 and 2005 servers We have a view that pulls the proj_name from the MS Project server. It sometimes includes .Published at the end of the name. Is there a way to trim a specific value from the end of the string? Thanks, littleccguy
From: Aaron Bertrand [SQL Server MVP] on 22 Jul 2008 13:20 One way... SELECT proj_name = CASE WHEN proj_name LIKE '%.Published' THEN LEFT(proj_name, LEN(RTRIM(proj_name))-11) ELSE proj_name END FROM ... "littleccguy" <tonkasanders(a)comcast.net> wrote in message news:455e708b-8653-461e-8c0b-4afcc9119761(a)f63g2000hsf.googlegroups.com... > Using SQL 2000 and 2005 servers > > We have a view that pulls the proj_name from the MS Project server. > It sometimes includes .Published at the end of the name. > > Is there a way to trim a specific value from the end of the string? > > Thanks, > > littleccguy
From: littleccguy on 22 Jul 2008 14:31 Thanks Aaron - perfect!
|
Pages: 1 Prev: Selecting from a table where my unique Key is not their unique key. Next: how to use SUM [RESOLVED] |