Solved

Useing Masks in a Query

Posted on 2002-07-03
3
181 Views
Last Modified: 2011-10-03
I want to check if the data in a specific column in my database applies to a certain input mask. I don’t want to loop trough every record but to use a SQL query like “SELECT * FROM border_Att WHERE drawingnr =  000/??-####” or something like that.

Please help.
0
Comment
Question by:WNE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 400 total points
ID: 7126520
Is this on SQL Server? If so you can use this:

"Select * From border_Att Where drawingnr Like '[0-9][0-9][0-9]/__-%'"
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7126524
This will match three numbers followed by "/" then any two characters then a hyphen then any characters.

You can also use [A-Z] to specify alphabetic characters or equally any range of printable characters.
0
 
LVL 1

Author Comment

by:WNE
ID: 7126732
That's it. Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question