Re: Spaces consume room?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Benny Tordrup (nospam)
Date: 02/27/04


Date: Fri, 27 Feb 2004 15:31:02 +0100

Stijn,

This is a matter of data type in the table. If the data type is char or
nchar, the field is filled with trailing spaces to the size. If the data
type is varchar or nvarchar, it is not.

Benny

"Stijn Verrept" <stijn@no_s.p.a.n.entrysoft.com> skrev i en meddelelse
news:403f5213$0$1919$ba620e4c@news.skynet.be...
> I have an ISA server logging to a SQL server. I noticed that it also
> writes space (for example after desthost).
>
> So when a record is: www.msn.be it puts spaces behind the name til it
> get to 255 chars.
>
> I'm gonna make a trigger who chops of those chars but I just want to
> make sure: these spaces do take up DB space correct? Because when I do
> a select length(DestHost) from ... it shows the small size.
>
>
> --
> Kind regards,
>
> Stijn Verrept.



Relevant Pages

  • Re: Perfromance issue
    ... This is not necessary for CHARs because ... this is just an artifact of the data type. ... Also, depending on the ANSI_PADDING settings, both VARCHARs and CHARs will ... To support what Andrew advised, the determination of either VARCHAR or CHAR ...
    (microsoft.public.sqlserver.clustering)
  • Re: Table fields of type MEMO are chunked cause of DISTINCT
    ... Contents in table fields of data type "memo" are chunked to a length of max ... 255 chars, if the fields are delivered by a query having the key word ... WHERE BUGS CAN BE REPORTED TO MICROSOFT? ...
    (microsoft.public.access.queries)
  • Re: NVL changing data type of a datetime?
    ... I've played some more with datetimes and also char columns and it seems ... the data type returned is that of the first argument. ... IDS 9.40.UC7 behaves the same way as it does for chars, ... it would be sensible to assume that the writing is on the wall - and fix your code to use CURRENT YEAR TO SECOND instead of just CURRENT. ...
    (comp.databases.informix)
  • Re: NVL changing data type of a datetime?
    ... I've played some more with datetimes and also char columns and it seems ... no matter which way round the arguments are and no matter which is null ... the data type returned is that of the first argument. ... IDS 9.40.UC7 behaves the same way as it does for chars, ...
    (comp.databases.informix)
  • Spaces consume room?
    ... I have an ISA server logging to a SQL server. ... writes space (for example after desthost). ... I'm gonna make a trigger who chops of those chars but I just want to ...
    (microsoft.public.sqlserver.programming)