Fred Webb
asked on
show records that have character string grater than 2
I have a query that displays customer information, I want to display the records where the state is grater than 2 characters
SELECT TOP (100) PERCENT CUSTNMBR, CUSTNAME, ADDRESS1, ADDRESS2, CITY, STATE, ZIP, PHONE1
FROM dbo.RM00101
WHERE (NOT (ADDRESS1 = ADDRESS2)) AND (NOT (CUSTCLAS = 'OBS')) AND (NOT (CUSTCLAS = 'EMP')) AND (NOT (CUSTCLAS = 'EXP')) AND
(NOT (CUSTCLAS = 'ADV')) AND (NOT (CUSTCLAS = '')) AND (NOT (CUSTCLAS = 'VEN')) AND (NOT (CUSTNMBR LIKE '%MISC%')) AND
(ADRSCODE = 'PRIMARY') AND (NOT (ZIP = ' ')) AND (NOT (ZIP LIKE '%N%')) AND (NOT (ZIP = '14624')) AND (NOT (STATE = ' ')) AND (NOT (STATE = '67'))
AND (NOT (ADDRESS1 = '100 airpark drive')) AND (NOT (ADDRESS1 LIKE '%PAYABLE%')) AND (NOT (ADDRESS1 LIKE 'Business%')) AND
(NOT (ADDRESS1 LIKE 'Attn%')) AND (NOT (CUSTCLAS LIKE 'CF')) AND (NOT (CUSTCLAS LIKE 'FA')) AND (NOT (CUSTCLAS LIKE 'PD')) AND
(NOT (CUSTCLAS LIKE 'SA')) AND (NOT (CUSTCLAS LIKE 'SD')) AND (NOT (CUSTCLAS LIKE '.')) AND (NOT (CUSTCLAS LIKE 'PA')) AND
(NOT (CUSTCLAS LIKE 'DNS')) AND (NOT (CUSTCLAS LIKE 'NC')) AND (NOT (HOLD = 1)) AND (NOT (INACTIVE = 1)) AND (NOT (CITY = ' '))
ORDER BY CUSTCLAS
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER