Looking for numbers and letters
Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Italian language
-- myQuery2asdf -- Looking for numbers and letters /* The results should only be values that have at least one number *and* at least one letter in them. Any value that does NOT have at least one *number* in it should not be returned. Any value that does NOT have at least one *letter* in it should not be returned. */ declare @T table([myField] varchar(10)) insert into @T values ('aaa') insert into @T values ('111') insert into @T values ('$$$') insert into @T values ('$1') insert into @T values ('$a') insert into @T values ('a1') insert into @T values ('a$1') select myField from @T where [myField] LIKE '%[0-9]%' AnD [myField] LIKE '%[a-zA-Z]%'