Hi I have a large table with allot of data in it, Im trying to find the correct SQL statement to select all the records that do not start with a letter or a number. So some records may start with a '~' and a few '$' and even some '?'. So I would like a statement that would select all of these while leaving out any records that start with anything else, such as numbers or letters. And on a similar theme, Im also trying to select all records that start with a number. Ive been using the "select blah from blah where LIKE 'a%'" for each letter and ive tried to have a play and search around that statement, but still not found an answer. Would appreciate any help on the matter
You've probably already looked but: http://www.w3schools.com/sql/default.asp Often is useful for this kinda thing! Ben
You were along the right lines by using the LIKE command. Try this: select * from table where field like '[^a-z]%' and like '[^0-9]%' This should return all records that do not start with A-Z or 0-9. Hope it helps.