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
Solved

Useing Masks in a Query

Posted on 2002-07-03
3
179 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
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 62
vb6 connector to mongodb 2 117
Using an encrypted  value to decrypt and display contents in vb6 9 55
Problem to line 23 53
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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