Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsI'm getting the following error message when I run the query below.
Illegal mix of collations (latin1_swedish_ci,IMPLICI
First, I'm wondering if there's a better way to write my query. Look at the Where clause. Notice I'm trying to combine wildcards with a field name as the search criteria. I was able to get this to work in Access, but I'm unsure of the syntax in MySQL.
If there's no better syntax, then how do I fix the error message? In one post on EE someone suggested using _latin1, but I don't know how to apply that to this query. Alternatively, I could potentially change my data to latin1... but I don't even know where I'm using UTF8 b/c my tables are latin1 (as far as I can tell).
SELECT shipping_details.orders_id
FROM shipping_criteria,
(
SELECT Orders.orders_id,
CASE
WHEN Orders.shipping_method like '%ground%' THEN 'GND'
WHEN Orders.shipping_method like '%2nd day%' THEN '2DA'
WHEN Orders.shipping_method like '%next day%' THEN '1DA'
WHEN Orders.shipping_method like '%canada%' THEN 'STD'
WHEN Orders.shipping_method like '%expedited%' THEN 'XPD'
WHEN Orders.shipping_method like '%Free Shipping%' THEN 'GND'
ELSE Orders.shipping_method
END as shipping_type,
DATE_FORMAT(now(),'%a') as Process_Day,
CASE
WHEN Orders.shipping_allowed Like '%GND%' Or Orders.shipping_allowed Like '%XPD%' Or Orders.shipping_allowed Like '%STD%' THEN 'Cold'
Else 'Warm'
END as Destination
FROM Orders
) AS shipping_details
WHERE shipping_criteria.Active=1
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: angelIIIPosted on 2007-10-08 at 12:38:16ID: 20036411
Comments are available to members only. Sign up or Log in to view these comments.