Re: How to get rid of those spaces efficiently?
From: Arsalan (arsalan_aslam_at_hotmail.com)
Date: 02/22/05
- Next message: rbutch_at_coair.com: "asp.net & sql server"
- Previous message: Elton Wang: "Having real difficulty with datatable relation"
- In reply to: Andrew: "How to get rid of those spaces efficiently?"
- Next in thread: PL: "Re: How to get rid of those spaces efficiently?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Feb 2005 02:23:41 +0500
Trim in the SQL statement for e.g
select TRIM(last_name) as TRIMMED_LASTNAME from employees
[I guess that will do in SQL server or MS Access, the trim function may
differ from database to database for e.g in Oracle you've two argument for
TRIM, so be sure to check it out]
"Andrew" <Andrew@discussions.microsoft.com> wrote in message
news:6178BACE-0D3C-40BE-A9D7-DBACF8D8B66B@microsoft.com...
> In the returned records in a DataSet, all the VARCHAR() field values are
> appended many spaces. When displaying each value, we have to use
> .ToString().Trim(). This is really annoying. Do we have a way to do this
> more
> efficiently, say, only trimmed VARCHAR() field values are returned?
>
> Thanks in advance.
- Next message: rbutch_at_coair.com: "asp.net & sql server"
- Previous message: Elton Wang: "Having real difficulty with datatable relation"
- In reply to: Andrew: "How to get rid of those spaces efficiently?"
- Next in thread: PL: "Re: How to get rid of those spaces efficiently?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|