944,051 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 3281
  • MySQL RSS
Mar 18th, 2005
0

query problem

Expand Post »
i'm having a problem with my SQL query. i'm trying to create another column with values based on the values of the other columns and call it sTitle. Every time i try to execute my SQL statement it brings back this error:

Illegal mix of collations for operation 'concat' Error No. 1271

I can't see anything wrong with my syntax but then again i'm kinda new to this. Here's my SQL:

MySQL Syntax (Toggle Plain Text)
  1. SELECT CONCAT(rgMake,' ',IF(rgModel='ST','',CONCAT(rgModel,' ')),IF(rgWheels='2','Two','Single'),' Wheel Roll Grinder ',ROUND(inDiaCenter*25.4,0),IFNULL(CONCAT('/',ROUND(inDiaMax*25.4,0)),''),' mm Dia. ',ROUND(inFace*25.4,0),' mm Roll Face') AS sTitle
  2. FROM tblMachine
  3. WHERE rgBecameAvailable IS NOT NULL
  4. ORDER BY rgWheels, ROUND(inDiaCenter*25.4,0), ROUND(inFace*25.4,0)

any advice would be greatly appreciated as this problem has been very frustrating to me. thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Morgoth is offline Offline
1 posts
since Mar 2005
Mar 27th, 2005
0

Re: query problem

can you have an IF statement in a SELECT?
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Phaelax is offline Offline
856 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Extracting Results from Query
Next Thread in MySQL Forum Timeline: checking if a value exists





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC