Below is the code that I'm using:
SELECT First_Name, Last_Name, City, Postal, First(Do_Not_Solicit), First(Account), First(State), First(Country), First(Email), First(Bad_Email), First(Bad_Email_Host), First(Do_Not_Email)
FROM [marketing lists]
WHERE (((Do_Not_Solicit = no)
and ((Last_Name is not null) and
(Country = 'usa' or Country = 'canada') and
(Title is null or not(Title like '*sales*' or Title like '*marketing*')) and
(Account not like 'univ*') and (Account_Industry is null or not(Account_Industry like 'instrument man*' or Account_Industry = 'university'))))
and ((Email like '*@*') and (Do_Not_Email = no) and (Bad_Email is null)))
GROUP BY First_Name, Last_Name, City, Postal;
But the Do_Not_Solicit and Do_Not_Email field's data type are yes/no. When I run the query, the field value for both of them become 0 and not yes or no. Why?
Could someone give me some advice? Thanks
SELECT First_Name, Last_Name, City, Postal, First(Do_Not_Solicit), First(Account), First(State), First(Country), First(Email), First(Bad_Email), First(Bad_Email_Host), First(Do_Not_Email)
FROM [marketing lists]
WHERE (((Do_Not_Solicit = no)
and ((Last_Name is not null) and
(Country = 'usa' or Country = 'canada') and
(Title is null or not(Title like '*sales*' or Title like '*marketing*')) and
(Account not like 'univ*') and (Account_Industry is null or not(Account_Industry like 'instrument man*' or Account_Industry = 'university'))))
and ((Email like '*@*') and (Do_Not_Email = no) and (Bad_Email is null)))
GROUP BY First_Name, Last_Name, City, Postal;
But the Do_Not_Solicit and Do_Not_Email field's data type are yes/no. When I run the query, the field value for both of them become 0 and not yes or no. Why?
Could someone give me some advice? Thanks