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 7747317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:29:57+00:00 2026-06-01T10:29:57+00:00

I’m having an sql error that i can’t work out. I have to update

  • 0

I’m having an sql error that i can’t work out. I have to update a table with a couple of joins. I tried doing it without an “in” clause, but that didnt’ work. Now with the in clause, here’s the query I have:

 UPDATE sc_module_architect 
    SET
    item_name="Print Cover Price"
    WHERE 
    item_id IN (
         SELECT a.item_id
         FROM sc_module_architect a
         LEFT JOIN sc_module_architect_category_links l on l.item_id=a.item_id
         LEFT JOIN sc_module_architect_category c on c.category_content_id=l.content_id
         LEFT JOIN sc_content sc on sc.content_id=l.content_id
         WHERE item_active=1
         AND content_name LIKE "ed_abc_print%"
         LIKE item_name LIKE "Cover Price%");

Now when running it I get the error

/* SQL Error (1093): You can't specify target table 'sc_module_architect' for update in FROM clause */

Can’t work out why this comes up. Any ideas? Mysql 5.5

  • 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-06-01T10:29:58+00:00Added an answer on June 1, 2026 at 10:29 am

    You cant use table under update in subquery also simultaneously:

    You need to follow below syntax:

    update tablea JOIN tableb ..... SET columnname='yourvalue' where [....]
    

    Try below:

    update sc_module_architect as t1  LEFT JOIN  (select a.item_id
        from sc_module_architect a
        left join sc_module_architect_category_links l on l.item_id=a.item_id
        left join sc_module_architect_category c on c.category_content_id=l.content_id
        left join sc_content sc on sc.content_id=l.content_id
        where
        item_active=1
        and content_name like "ed_abc_print%"
        and item_name like "Cover Price%") as t2
        on t1.item_id=t2.itemid
        set
        t1.item_name="Print Cover Price"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

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.