Question : SQL Query help

I need to write a query on the order of the following from a file:

First Name
State Code 1
Lic Nbr 1
State Code 2
Lic Nbr 2

What I want to select and display is:

1. Any state codes where the value is not "" AND
2. A license number that does not fit a pre-determined mask.

For example, the state of New Jersey has a mask: 38MC00XXXXXX where X is a numeric value.
or the state of Arkansas has 3 masks: XXX or XXXX or XXXXX

Can anyone help me with a start of the SQL that I can take from there?


Related Solutions: Running a query in a function

Answer : SQL Query help

Yes. I think so. Let us know then how our original code suggestions work out since they were based on the data being in separate fields.

Random Solutions  
programming4us programming4us