Hopefully this is a simple request.
I have a table that contains place names in lower and upper case, I
want to select all those that are Upper Case, is there some simple SQL
to do this?
Thanks,
Hayleigh
This will return all the records whose first character is a capital A
through Z.
97 through 122 for lower case. Non-ASCII characters (e.g., German,
French, Spanish, Danish, Swedish ) are a different story.
Rather than remember the numbers you can also do it this way !
select * from table_name where asc(columnInQuestion) between asc("A")
and asc("Z")
Eric
So, to select all upper-case text, you might try
Select * from mytable
where LIKE(mycolumn, ucase$(mycolumn), "\")
It's not particularly robust, since your column may hold values with "%" or
"_" characters.
You could write a function in MapBasic to insert "\" characters before any %
and _ characters and use the function in a SQL query in a MapBasic app.
But you should base your decision to do that on how likely it is those
characters will appear in your data.
________________________________
Spencer
Eric
--
You received this message because you are subscribed to the Google Groups
"MapInfo-L" group.
To post to this group, send email to mapi...@googlegroups.com.
To unsubscribe from this group, send email to
mapinfo-l+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mapinfo-l?hl=en.
As you probably already know, the "=" operator is not case sensitive in MapInfo Pro. However, there is a function called StringCompare(Str1, Str2) which returns 0 if the strings are equal with case sensitivity. You can combine this with the ucase$() function which forces a string to uppercase.
So, your where clause to return only the uppercase entries would be:
StringCompare(YourField, ucase$(YourField)) = 0
Regards,
Warren Vick
Europa Technologies Ltd.
http://www.europa.uk.com
Hi all,
Thanks,
Hayleigh
--
Thanks very much!
Hayleigh
Eric Blasenheim
PBBI (MapInfo)
Spencer
-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On
Behalf Of hayleigh
Sent: Monday, March 22, 2010 6:35 AM
To: MapInfo-L
Subject: [MI-L] Re: Select Upper Case text
Thanks very much!
Hayleigh
--