| Author |
Len() on a data type text field
|
|
| Ben Bleser 2005-03-31, 8:01 pm |
| I'm trying to do a len() function on a text field in SQl
Server 2000. Of course this doesn't work but is there a
another way to do this?
Thanks,
Ben Bleser
| |
| Marco Pais 2005-03-31, 8:01 pm |
| The LEN() function should work in SQL Server 2000. Why can't you use it?
"Ben Bleser" < anonymous@discussion
s.microsoft.com> wrote in message
news:11d101c5360c$99
251960$a601280a@phx.gbl...
> I'm trying to do a len() function on a text field in SQl
> Server 2000. Of course this doesn't work but is there a
> another way to do this?
>
> Thanks,
> Ben Bleser
| |
| Lars Broberg 2005-03-31, 8:01 pm |
| Ben,
Try DataLength(column)
Lars Broberg
Elbe-Data AB
http://www.elbe-data.se
Remove "nothing." when replying to private e-mail!
Ben Bleser wrote:
> I'm trying to do a len() function on a text field in SQl
> Server 2000. Of course this doesn't work but is there a
> another way to do this?
>
> Thanks,
> Ben Bleser
| |
|
| DATALENGTH()
"Ben Bleser" wrote:
> I'm trying to do a len() function on a text field in SQl
> Server 2000. Of course this doesn't work but is there a
> another way to do this?
>
> Thanks,
> Ben Bleser
>
| |
| Tibor Karaszi 2005-03-31, 8:01 pm |
| DATALENGTH()
Should give the same as LEN() would have for text datatype.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
http://www.sqlug.se/
"Ben Bleser" < anonymous@discussion
s.microsoft.com> wrote in message
news:11d101c5360c$99
251960$a601280a@phx.gbl...
> I'm trying to do a len() function on a text field in SQl
> Server 2000. Of course this doesn't work but is there a
> another way to do this?
>
> Thanks,
> Ben Bleser
| |
| Aaron [SQL Server MVP] 2005-03-31, 8:01 pm |
| The datatype is TEXT. So, several string functions are not valid, including
LEN().
--
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"Marco Pais" < mpaisIGNORE@foruminf
ormatica.pt> wrote in message
news:u#LOj2gNFHA.3336@TK2MSFTNGP09.phx.gbl...
> The LEN() function should work in SQL Server 2000. Why can't you use it?
|
|
|
|