Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find addresses with upper case

Status
Not open for further replies.

polymath5

MIS
Dec 23, 2000
512
0
0
US
Sorry if this is a silly question. But I can't seem to get this to work.

I have an address field in SQL that have some records that start with an upper case letter or letters. I would like to find only these records. Currently, I just get all records, regardless of case.

Running CR 9.

Thanks!

=============
Mens et Manus
=============
 
This will depend on your database. If it's case-sensitive, go to Options (or Report Options for one report) and UNcheck "Database Server Is Case-Insensitive" (I think it's usually checked by default)and use a record selection formula like the following:
{Customer.Customer Name} startswith Uppercase(left({Customer.Customer Name},1))

That should do it for you.
 
You might simplify by creating a SQL Expression of:

substr(table.field,1,1) = upper(substr(table.field,1,1))

Then you can use a record selection of:

{%MySQLExpression} = true

The syntax will depend upon the database in use, I guess you mean SQL Server when you say SQL (SQL is a database programming language, not a database type).

-k
 
Thanks all! I'll give your suggestions a try and see what happens. And yes, I did mean SQL server.

Thanks again!

=============
Mens et Manus
=============
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top