A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Validation rule for 1 capital letter?



 
 
Thread Tools Display Modes
  #11  
Old August 19th, 2005, 04:21 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

I like this one....

--

Ken Snell
MS ACCESS MVP

wrote in message
ups.com...

Ken Snell [MVP] wrote:
I just can never remember the exact ascii number for
those letters, and always have to go look them up or run a test in the
Immediate Window... laziness sometimes interferes!


OK this then, which does actually read better:

CHECK(ASC(LEFT$(last_name, 1)) BETWEEN ASC('A') AND ASC('Z'))





  #13  
Old August 22nd, 2005, 09:57 AM
external usenet poster
 
Posts: n/a
Default


John Nurick wrote:
It would be nice to make it international. For instance in Perl or .NET
one can take advantage of Unicode properties and match the string
against "^\p{Lu}". Is it possible to do something analogous in Jet SQL
... or any SQL?


For Jet, this isn't possible at the data engine level because Jet
doesn't support 'proper' regular expressions; rather, we merely get the
simple pattern matching the VBA Like keyword supports. Native SQL
Server/MSDE support isn't any better. I can't recall any other SQLs
doing much better either.

You can write a T-SQL (SQL Server/MSDE) extended stored procedure to
use a more advanced regex code library which could then be applied to a
CHECK constraint i.e. applied at the data server level rather in a
front end application. I don't think you can do the same using VBA in
Access because Validation rules get written into the schema as CHECK
constraints, but I'm not 100% sure on this. Anyone?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation rule hughess7 General Discussion 3 August 4th, 2005 07:28 PM
Convert to Symbols Omar Menjivar General Discussion 7 June 27th, 2005 07:32 PM
Validation Rule - must have at least 1 number and 1 letter kishan Database Design 3 April 25th, 2005 02:18 PM
Fw: Validation rule problem Geo Using Forms 0 September 14th, 2004 08:38 AM
Validation Rule question Lori Using Forms 1 July 20th, 2004 06:32 PM


All times are GMT +1. The time now is 06:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.