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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:18:01+00:00 2026-06-14T15:18:01+00:00

In 1_products t2 I have other columns called make,model When I add them (SELECT

  • 0

In 1_products t2 I have other columns called make,model

When I add them

(SELECT 
            t2.code,t2.make,t2.model
        FROM .....

I get

Error 1241 Operand should contain 1 column(s)

SELECT 
    t1.fk_products_id,
    (SELECT 
            t2.code
        FROM
            1_products t2
        WHERE
            t2.id = t1.fk_products_id
        order by code
        limit 1)
FROM
    1_stock t1
WHERE
    t1.branch = 1 and t1.dispatch <> 0;
  • 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-14T15:18:03+00:00Added an answer on June 14, 2026 at 3:18 pm

    You cannot return more than one column in an inline query. If you want to return more than one column for each t1.fk_products_id then you will have to rewrite the query similar to this:

    SELECT t1.fk_products_id,
      t2.code,
      t2.make,
      t2.model
    FROM 1_stock t1
    LEFT JOIN 1_products t2
      on t1.fk_products_id = t2.id
    WHERE t1.branch = 1 
      and t1.dispatch <> 0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table called tblProducts with 3 columns: intID, dateMain, intStatus. I have
I want to select distinct product_series, but I want all the other columns too.
I have a table (Oracle 11.2.0.2) with an xmltype column and other non-xmltype columns.
I am building an e-commerce website from scratch and have to make a special
I have a data frame with a date column and some other value columns.
products(id, name) categories(id, name, product_id) I have a sample code: products(1, 'Apple') And categories
I have an existing Rails 3.1 application with a model Products with price, description,
I have a dataset whose columns look like this: Consumer ID | Product ID
So I am practicing using a databases with ASP.Net... I have two datatable columns
I have Assignment due in which i'm stuck on a question. Add a Sales

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.