Re: len() malfunction?
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 07/16/04
- Next message: Jacco Schalkwijk: "Re: len() malfunction?"
- Previous message: Vishal Parkar: "Re: update query from access"
- In reply to: Richard Ding: "Re: len() malfunction?"
- Next in thread: Jacco Schalkwijk: "Re: len() malfunction?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 16 Jul 2004 10:39:33 -0400
What objects have trailing spaces? I can't reproduce your problem on my
system, using:
SELECT
name,
rtrim(name),
len(name),
datalength(name),
len(rtrim(name)),
datalength(rtrim(name)),
len(left(name, 10)),
datalength(left(name, 10)),
len(left(name, len(rtrim(name)))),
datalength(left(name, len(rtrim(name))))
FROM sysobjects
Any reason you're not just doing SELECT RTRIM(name)? Have you considered
converting the name to varchar (assuming you don't have any foreign
alphabets / unicode in your object names)? What about letting your
presentation tool deal with trailing spaces? What about using
INFORMATION_SCHEMA.ROUTINES instead of sysobjects?
-- http://www.aspfaq.com/ (Reverse address to reply.) "Richard Ding" <rding@acadian-asset.com> wrote in message news:uwu8FD0aEHA.4032@TK2MSFTNGP11.phx.gbl... > I'm getting a returned column set with width of 128 characters even though > the longest name of all the stored procedures is only 44 characters. I'm > expecting the left() function would truncate certain xxx number of > characters from the right as specified in left(name, xxx). In my code, the > width of the name column returned should be 44 character long.
- Next message: Jacco Schalkwijk: "Re: len() malfunction?"
- Previous message: Vishal Parkar: "Re: update query from access"
- In reply to: Richard Ding: "Re: len() malfunction?"
- Next in thread: Jacco Schalkwijk: "Re: len() malfunction?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|