Page 1 of 1

trim field values (SQL)

PostPosted: Mon Jun 28, 2010 10:12 am
by Filipe Matos
Hello,

is it possible to remove the blanks chars at the end of the variables when using placeholders in emails?
For instance, I'm replacing the placeholders %[Request_ID].[Requester_ID].[First_Name]% + %[Request_ID].[Requester_ID].[Last_Name]% and the output looks like this:

Hello Filipe_______________________________ Matos__________________________,

(with "_" being a blank)

I've been playing around with the SQL function TRIM() but found no way to embed it.
Any ideas out there?

Regards
Filipe Matos

Re: trim field values (SQL)

PostPosted: Tue Jun 29, 2010 5:40 pm
by eliaslynch
hmm, this makes me think the first/last name fields have that space at the end of them. maybe you might want to remove the space from the fields in the person records instead?

also, if you remove these spaces from person records, do they exist in active directory with spaces? I'd always go back to the source if you can. if you can do it at the person record level, try these links.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72652

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=56195

Re: trim field values (SQL)

PostPosted: Thu Jul 01, 2010 4:34 am
by Filipe Matos
Hello Elias,

you're absolutely right, those blanks are indeed stored within the fields in the database. I will get back to the data import (we're not getting it from AD, instead we import persons from another database) and get rid of the blanks at the source.

Thank you and best regards
Filipe Matos