Try this -
Select count(*) from table
Where length (col1) > 2;
HTH
-----Original Message-----
From: Bill Ducker [mailto:bill.[Email Address Removed]
Sent: Monday, June 30, 2003 2:44 PM
To: LazyDBA.com Discussion
Subject: A Simple SQL Question
My table has a VARCHAR2(100) column. Most of the rows have two characters
('AL', 'RS', etc.) in this column. Some, however, have much more ('American
Board of Surgeons', etc.). How do I write a SELECT COUNT(*) FROM tablename
WHERE... statement to count the rows which have something more than two
characters?
William L. (Bill) Ducker
Mainframe Database & Security Administrator
ADABAS 7.1.2, Oracle 9i
Texas Workers' Compensation Commission bill.[Email Address Removed] 804-4974
--- Any opinions in this message are mine, and do not
represent official TWCC policy.
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page