Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trimming Data

Status
Not open for further replies.

renee35

MIS
Joined
Jan 30, 2007
Messages
199
I have a field that looks similar to this:

F1 - Test
F02 - Test
.
.
F15.25 - Test

I am trying to get the data in the front before the "-". cannot use the trim function because the amount to be trimmed is not the same and when I use the "charindex function it returns a 1,0, or null. My charindex looks something like this:

'MILESTONE'=left(charindex('',S_XX.NAME,-1),

I am missing something or is more needed?

Any help is greatly appreciated..


Thanks a bunch!!

-T
 
You maybe could use the split function within reporting services itself (perhaps in a customer function), that would split based on the '-'
 

Try

left('F15.25 - Test', patindex('%-%','F15.25 - Test')-1)

Shoudl work fine.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top