Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 select word size

Author  Topic 

helixpoint
Constraint Violating Yak Guru

291 Posts

Posted - 2008-05-14 : 14:52:30
Is it possible to select words that have a certain char size in a given field?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 15:01:43
Yes but it probably wouldn't perform too well.

WHERE DATALENGTH(Column1) = 4

Or LEN(Column1), depends on what you want to do if there are trailing spaces.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page
   

- Advertisement -