Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7579387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:39:59+00:00 2026-05-30T17:39:59+00:00

Hey guys I’m getting a syntax error on my CONCATS for some reason, this

  • 0

Hey guys I’m getting a syntax error on my CONCATS for some reason,
this is very weird since its pretty much a copy/paste from another
one of my queries using CONCATS that works flawlessly?

Here’s the bad query

SELECT 
    brand, 
    case_count AS case, 
    variety, 
    style, 
    grower_lot AS lot, 
    pack_date AS date, 
    CONCAT(berry_size1, "-", berry_size2, "/", berry_size3, "-", berry_size4) AS size, 
    CONCAT(color1, "-", color2) AS color, 
    CONCAT(stem1, "-", stem2, "-", stem3) AS stem_cndt, 
    CONCAT(bunch_count1, "-", bunch_count2, "-", bunch_count3) AS bnch_cnt, 
    CONCAT(shatter1, "-", shatter2) AS shatter, 
    CONCAT(splits1, "-", splits2) AS split, 
    CONCAT(decay_count1, "-", decay_count2) AS decay, 
    CONCAT(wet_sticky1, "-", wet_sticky2) AS wet_sticky, 
    overall_quality AS quality, 
    CONCAT(sugar_brix1, "-", sugar_brix2) brix, 
    overall_condition AS condition, 
    rating, 
    inspector AS insp, 
    comments 
FROM `lot`

#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘case, variety, style, grower_lot AS lot, pack_date AS date, ‘ at line 3

And here’s one that seems to work

SELECT
        shipper, 
        po, 
        commodity as comm, 
        count, 
        size, 
        label, 
        variety, 
        pack_date AS date, 
        grower_lot AS lot, 
        CONCAT(color1, "-", color2) AS color, 
        CONCAT(sizing1, "-", sizing2, " / ", "sizing3", "-", sizing4 ) AS size, 
        CONCAT(firmness1, "-", firmness2) AS firmness, 
        CONCAT(scars_count1, "-", scars_count2) AS scars, 
        CONCAT(bruise_count2, "-", bruise_count2) AS bruise, 
        CONCAT(decay_count1, "-", decay_count2) AS decay_cnt, 
        CONCAT(sugar_brix1, "-", sugar_brix2) brix, 
        rating, 
        inspector AS insp, 
        comments
FROM `berries`
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:40:01+00:00Added an answer on May 30, 2026 at 5:40 pm

    Not an issue with CONCAT per se, but case is a reserved word in MySQL, and needs to be backtick-escaped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys i'm making a website but for some reason my div tags are
Hey guys. This is a follow-on from this question : After getting the right
Hey guys, I'm just starting out with GWT and am getting the following error
hey guys, i'm getting an exception on the following inner exception: {Value cannot be
Hey guys, I want to store a categorized list of URLs. This is an
Hey Guys, here is my code for this, the only help i get from
hey guys I have the follow code in js: $(document).ready(function(){ $(.replyLink).click(function(){ $(#form-to-+this.id).html(htmlForm()).toggle(500); return false;
Hey guys I'm creating a quick mysql file to create a DB with some
Hey Guys I've been struggling with this for the last hour and pouring over
Hey guys I can't seem to get the syntax here right, I'm just trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.