troubleshooting Question

SELECT statement not returning data

Avatar of Sandra Smith
Sandra SmithFlag for United States of America asked on
Microsoft SQL Server 2005Microsoft DevelopmentSQL
7 Comments1 Solution170 ViewsLast Modified:
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'
ASKER CERTIFIED SOLUTION
Aneesh
Database Consultant
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros