-
character length in SQL
What is the syntax to count the # of characters in any given field in Transact SQL?
-
character length in SQL (reply)
Jodi,
If you do it in a select statement it is simply:
select LEN(<char field name>) from <table name> ...
One thing I use LEN( ) for is to find the longest set of chars in a column that is simply:
select MAX(LEN(<char field name>)) from <table name> ...
the same could be done to find the shortest.
Hope this helps.
Levi
BrainBuzz.com
Mother of All Tech Sites
------------
Jodi at 12/29/99 11:29:57 AM
What is the syntax to count the # of characters in any given field in Transact SQL?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|