Ok, it has been a while since I worked on an actual server database, I have been mostly wokring in ACCESS. So, I have the below query that simply refuses to work. There is data in the table, but I do not know what is wrong with my select statement. I want all the loans except those that have 10 digits in the number and no text characters. what is going on is the nubmer i want are in the form like 11111.10 or 11111-10, but NOT accounts 000000002 or 11111-10C.
SELECT balview.LOAN, balview.PRIN_BAL_P, balview.PRIN_BAL_P FROM balview WHERE balview.LOAN Like '?????.*' Or balview.LOAN Like '?????-*' And balview.LOAN Not Like '*[A-Z]*') AND balview.ACCOUNTING_DATE = '2007-11-30'
* you placed a ) but I don't see the ( for that one
* you have a OR, but to get this working properly, you need a () around the 2 OR parts.
* I replaced the NOT LIKE by a LIKE with a changed pattern
Open in new window