79 questions
-2
votes
1
answer
201
views
Error Code 1241 Operand should contain 1 column(s)
delete from invoices
where client_id = (
select*
from clients
where name = 'Myworks'
);
I'm trying to delete a row of data for a client from another table called invoices, but it throws me an error ...
-1
votes
1
answer
126
views
Error Code: 1241. Operand should contain 1 column(s) when delete duplicate
delete from dupp
where empno in (select empno,count() from dupp
group by empno
having count()>1)
Error Code: 1241. Operand should contain 1 column(s)
what can i do to slove this ??/
i want to ...
0
votes
1
answer
798
views
insert if row count is 0
The following query works in MySQL:
INSERT INTO `test`.`address_tab1`
(`city`,`street_name`,`pincode`)
SELECT
'mycity1', 'mystreerName1', '4855881'
where (SELECT COUNT(*) FROM `test`.`address_tab1`) ...
0
votes
1
answer
105
views
MySQL database (8.0.30) - Error Code: 1241. Operand should contain 1 column(s) - Error on stored procedure and cursor
I'm struggling with a MySQL 1241 "Operand should contain 1 column(s)" error.
This is a test stored procedure. I cannot figure out where's the problem. I'm learning MySQL, thanks!
DECLARE ...
1
vote
1
answer
99
views
MySQL subquery ERROR CODE 1241 SQLState 21000
I want to retrieve First and Last Row using client_id from my table. So I wrote this which threw an error (1241), Can Anyone please tell me what this issue with this code :
SELECT *
FROM invoices
...
-5
votes
1
answer
571
views
#1241 - Operand should contain 1 column(s) nested query [duplicate]
i found this error when I enter this command
SELECT *
FROM Borrowed_Book , User
WHERE User.UserId=Borrowed_Book.UserId IN (
SELECT *
FROM Book , Book_version_info
WHERE
...
0
votes
1
answer
89
views
Why do I receive error 1241 when trying to Create and Insert data into a new table (on phpMyAdmin)?
I am trying to create a new table and insert values into it however I keep receiving "#1241 - Operand should contain 1 column(s)".
Please could someone help to identify what is wrong with my code as ...
0
votes
0
answers
97
views
Operand should contain 1 column(s) in Mysql - Error #1241
I just tried the below query in mysql-
SELECT booking0_.id AS id1_6_,
booking0_.booking_comment AS booking_2_6_,
booking0_.booking_status ...
0
votes
3
answers
124
views
How do I fix Error Code 1241: Operand should contain 1 column(s) in mysql query?
select firstName, lastName from students, courses, registration
where students.studentID = registration.studentID
and courses.courseCode = registration.courseCode
and gender = 'M' and courseName = '...
0
votes
1
answer
94
views
Error Code 1241 - Operand should contain 1 column(s)
I was creating a procedure and I came across this.
Does anyone know how to solve this?
delimiter $$
create procedure sp_cadastraAluno(
in nome varchar(150),
in chamada varchar(3),
in data date,
in ...
0
votes
1
answer
23
views
What is the problem with this query? I am trying to create a practice small table with some primary id to do matching but I don't find the error here
Small table to practice id matching.
CREATE DATABASE test_1;
USE test_1;
CREATE TABLE test_items(
contact_id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR (20) ,
last_name VARCHAR (20),
PRIMARY ...
1
vote
1
answer
356
views
How to fix "ERROR 1241 (21000): Operand should contain 1 column(s)" in mysql?
i want to display details of drivers working in morning shift..
delimiter //
create function dShift(n int)
returns varchar(128)
deterministic
begin
return (select driver.driver_no,driver_name,...
0
votes
1
answer
199
views
#1241: Operand should contain 1 column(s) [duplicate]
I get the error code '#1241: Operand should contain 1 column(s)'.
The code worked once, I didn't alter it though. But now it doesn't work anymore.
What is the problem? It's something with the IN ...
2
votes
1
answer
75
views
If else in stored procedure in mysql
Hello guys I'm little bit confuse. I just want to ask if this is the right syntax. I try the if else stored proc queries in other posts but its not working.
CREATE PROCEDURE `addBarberCommission`(IN `...
1
vote
2
answers
87
views
MySQL 1241 error
I have 2 independent queries which are calculating the total IN/OUT of payments for a given festival. The IN/OUT is given by a ENUM value (see below).
If I run the queries independently it gives the ...
0
votes
1
answer
91
views
Stored Procedure IF statement in MY SQL returing error 1241
I am writing this code in MYSQL workbench to check for the data in several tables in order to enter a customer and various customer details in multiple tables without duplication and to gather the ...
0
votes
1
answer
276
views
Error #1241 Operand should contain 1 column(s) in Mysqlworkbench
I just try following query:
CREATE DEFINER=`root`@`localhost` FUNCTION `cal1`(z DATE , y DATE) RETURNS float
BEGIN
SET @c= (SELECT a.StudentName, (b.marks/a.marks) as difference from (select Date, ...
0
votes
1
answer
3k
views
#1241 - Operand should contain 1 column(s) - why am i getting this? [duplicate]
I am trying to run a query but I am getting the above error. can anyone let me know why am I getting it.
UPDATE `catalog_eav_attribute`
SET `used_for_sort_by` = 1
WHERE attribute_id = (
SELECT * FROM ...
0
votes
0
answers
90
views
Scrapy: Error 1241 and 1064 while sending datas to MySQL
I want to send datas that I've scraped to a MySQL database. Here is my pipelines.py :
class MyImagesPipeline(ImagesPipeline):
def get_media_requests(self, item, info):
for image_url in ...
0
votes
1
answer
360
views
MySql CASE expression with two input columns
I'm looking to use a case expression in mysql with two columns as input. This is how I would like to format the code. All code snippets use Set @a = 0; Set @b = 0; at the start, although those values ...
-1
votes
2
answers
118
views
sql error (1241): operand should contain 1 column(s) - order by dates
I'm trying to find the last deployment associated to a serial number, and without getting the latest date, I get multiple lines for a particular serial number. I'm getting the error 1241 when I enter ...
0
votes
2
answers
4k
views
sql MySQL error (1241) operand should contain 1 column(s)
first I will like to state that am still a newbie on writing SQL Queries. I thoroughly searched for an answer on this Error and I got a good number of answers, but none seems to be helpful or I will ...
3
votes
1
answer
14k
views
MySQL INSERT Error Operand should contain 1 column
I have this MySQL insert query that is giving me a Error Code: 1241. Operand should contain 1 column(s).
INSERT INTO esjp_content
( esjp_content.primary_key, esjp_content.template_id, ...
0
votes
1
answer
1k
views
SQL Error - #1241 - Operand should contain 1 column(s) [duplicate]
SELECT
k.*,
y.exchange,
(
SELECT
close AS close_20,
close_adj AS close_adj_20
FROM stocks k
WHERE
t = (
...
2
votes
3
answers
429
views
SQL SELECT DISTINCT Subquery Error: 1241
I am working on a long query that includes a SELECT DISTINCT and subquery. It is partially working, but not when put together. I am getting a Error: 1241 - Operand should contain 1 column(s) and I ...
0
votes
1
answer
84
views
mysterious runtime error in stored proc
DELIMITER //
drop procedure if exists stugrade//
create procedure stugrade()
begin
declare v_pid,v_sub1,v_sub2,v_sub3 int;
declare total int default 0;
declare v_finished int default 0;
declare per ...
0
votes
0
answers
33
views
ERROR 1241 (21000): Operand should contain 1 column(s) [duplicate]
my SQL Query:
select * from tbl_vehicle
join tbl_driver on tbl_vehicle.pk_vehicle_id = tbl_driver.fk_vehicle_id
join tbl_location on tbl_driver.pk_driver_id = tbl_location.fk_driver_id
join ...
1
vote
1
answer
3k
views
Sql Error 1241: Operand should contain 1 column(s) [duplicate]
I've been searching around for a bit now, but I haven't been able to find the solution yet, so I thought I'd ask here.
I've got this query and it returns the 1241 error. What am I doing wrong?
SELECT ...
0
votes
1
answer
784
views
Operand should contain 1 column(s) Database error
Hi guys I know this has been answered on here in a number of threads, but I just can't figure out what the error is in my query. I get the error 'Operand should contain 1 column(s)'. Looks like a ...
-1
votes
1
answer
356
views
Operand should contain 1 column [duplicate]
Hello i try to run this query but this error come up
#1241 - Operand should contain 1 column(s)
here is the code :
SELECT
(SELECT kk.namakk, anggkk.nama AS istri
FROM kk
JOIN anggkk
USING ( idkk ) ...
4
votes
3
answers
17k
views
Operand should contain 1 column(s) in java [duplicate]
String sql = "SELECT (Employee_name, Password) FROM employee WHERE (Employee_name = '"+name+"' AND Password = '"+password+"')";
and getting the following exception in JSP
java.sql.sqlexception ...
0
votes
3
answers
1k
views
Error message "Operand should contain 1 column(s)"
Am trying to select the day and month part for a range of date of a date field in mysql and its given me this error"Operand should contain 1 column(s)".
tablename is personal
date field name is dob
"...
1
vote
1
answer
125
views
Unexpected Operand should contain 1 columns error [duplicate]
I have a table, exposure, which looks like this:
+------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------...
0
votes
1
answer
80
views
mysql operand should contain 1 column [duplicate]
i have two tables named newlab and deadstock both are in same database
and i want to copy some of the fields of newlab to deadstock for that i am using the follwing code
INSERT INTO deadstock
(MAC,...
2
votes
1
answer
543
views
MySQL SP: ERROR 1241 (21000)
Hi im trying to insert using this sp with insert statment of:
call insertuser (1, '077788899965', 'Digest 1.0', ':=', 'asjdfhiuoadshgiadufg');
SP CODE:
DELIMITER$$
CREATE PROCEDURE insertuser (IN ...
-4
votes
1
answer
2k
views
insert error code 1241 operand should contain 1 column(s)
I am trying to Insert data into zone_sig
INSERT INTO zone_sig values (0,0,0,0,'24','Siliana','Kesra','2459',(0.95830721023,0.03643552658),'Région du Nord-Ouest',0);
but i get the error:
error code ...
-1
votes
1
answer
97
views
my sql operand should contain 1 column in my database [duplicate]
when i execute this query
SELECT
tbcategory.CATEGORY_ID,
tbcategory.VENDOR_ID,
tbcategory.CATEGORY_NAME,
tbsubcategory.SUB_CATEGORY_ID,
tbsubcategory.SUB_CATEGORY_NAME,
...
0
votes
1
answer
4k
views
I am getting the error Operand should contain 1 column(s) [duplicate]
Here is my code that I have and I cannot figure out why the following code returns the error Operand should contain 1 column(s). I know that both queries work independantly of the query I have below. ...
0
votes
3
answers
2k
views
what is causing error (operands should contain 1 column)
I am trying to set myItemId so that I can use it in the concat query. Everything works fine until I add this row
SET myItemID = (SELECT * FROM items i WHERE i.name LIKE '%KW PRE FREE COOLING%');
...
1
vote
1
answer
2k
views
mysql trigger operand should contain 2 columns
My trigger looks like this:
begin
IF ((NEW.tgebucht >= NEW.tteilnmax) AND (NEW.tgebucht!=0) AND (OLD.tstatus=0)) THEN
SET NEW.tstatus = 1;
ELSEIF ((NEW.tgebucht < NEW.tteilnmax) AND (OLD....
0
votes
1
answer
866
views
MYSQL: Operand should contain 1 column(s)
Im trying to get a list of products order by the amount sold and by date... I also want to display the products that havent been sold in the list so I tried doing a subquery but MYSQL is giving me ...
0
votes
2
answers
1k
views
Operand should contain 1 column(s) error [duplicate]
I have an sql query that was returning some incorrect results due to product id's being duplicated for linked products, so i added the following to the end of my query expecting it to only take the ...
1
vote
3
answers
648
views
Operand should contain 1 column when joining tables with update
I'm trying to update a table by combining two queries as follows
UPDATE result, games_played
SET result.precentage_correct =
(
SELECT user_id, 100*SUM(n_win)/SUM(n_total) AS pct_win FROM
(...
10
votes
1
answer
51k
views
Mysql ERROR 1241 (21000): Operand should contain 1 column(s)
I have Customer Groups with Number-Ranges (from Customernumber, to Customernumber).
select g.id,
(select count(*), sum(sales)
FROM transactions t1
where t1.customernumber between g....
0
votes
1
answer
251
views
Copying rows error message "Operand should contain 1 column(s)" [duplicate]
I am trying to transfer data from one row to another within phpmyadmin, but when I attempt i I get the following error message.
Operand should contain 1 column(s)
Code I attempt :
INSERT INTO ...
2
votes
1
answer
112
views
Selecting two columns in subquery
I have the following SQL statement:
SELECT Office,
COUNT(Office) As Tot_Part,
(SELECT Office, COUNT(Office)
FROM trespondent
WHERE completion_status= 'Started'
OR ...
4
votes
2
answers
10k
views
Error #1241 - Operand should contain 1 column(s)
I am trying this QUERY, and return this weird error. What does it mean?
Here is my query:
SELECT * FROM newRowP a WHERE a.rowId IN
(SELECT * FROM newCellP b WHERE b.cellId IN
(SELECT * FROM ...
1
vote
3
answers
2k
views
#1241 - Operand should contain 1 column(s) IN [duplicate]
i have a problem with mysql 5.6 version.
Sorry if my english sucks, and sorry if the format is not the right one, im in a hurry.
Mysql throws me this error "#1241 - Operand should contain 1 column(s)"...
0
votes
3
answers
208
views
#1241 - Operand should contain 1 column(s) MYSQL [duplicate]
I am trying to get data from the database like that, but i have this error how can i fix?
SELECT post.text,users.name,users.surname,users.profile_id,post.post_id,comments.text as comment,
(SELECT ...
0
votes
2
answers
1k
views
#1241 - Operand should contain 1 column(s) how to fix? [duplicate]
Hello guys i have this error in mysql with the following query, I don't know where do mistake, thank you for the help :)
SELECT a.*,b.*,users.*,
(SELECT p.msg_text,p.occured_at
FROM ...