I am working in SQL Server 2005 and am LINKED to an ORACLE database.
I need help writing a query that only returns what I am looking for. On the table I am quering there is a field called acct_nbr that is a varchar(25). In that field there will be one of two types of entries. Type One - the field will only contain a value that consists of any combination of charecters of 0-9 and will always have a length of 9. Type two - The field will hold a value that has a combination of characters that consist of A-Z only.
I only want to return all records where the acct_nbr field contains charaters of only (0-9)
My current query returns results of:
I only want to return record 1
This query does not work:
where acct_nbr like (''%0-9%'')