Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
1 answer
201 views

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 ...
Seevy's user avatar
  • 1
-1 votes
1 answer
126 views

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 ...
maxe magesh's user avatar
0 votes
1 answer
798 views

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`) ...
Nazir's user avatar
  • 253
0 votes
1 answer
105 views

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 ...
Gabriel Vargas's user avatar
1 vote
1 answer
99 views

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 ...
Adarsh Mishra's user avatar
-5 votes
1 answer
571 views

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 ...
samxx123's user avatar
0 votes
1 answer
89 views

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 ...
GregRoberts0319's user avatar
0 votes
0 answers
97 views

I just tried the below query in mysql- SELECT booking0_.id AS id1_6_, booking0_.booking_comment AS booking_2_6_, booking0_.booking_status ...
Prashant Chaudhary's user avatar
0 votes
3 answers
124 views

select firstName, lastName from students, courses, registration where students.studentID = registration.studentID and courses.courseCode = registration.courseCode and gender = 'M' and courseName = '...
Fiona O's user avatar
0 votes
1 answer
94 views

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 ...
Barbara Hellen's user avatar
0 votes
1 answer
23 views

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 ...
csoto343's user avatar
1 vote
1 answer
356 views

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,...
Deepak Pawade's user avatar
0 votes
1 answer
199 views

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 ...
M. Keller's user avatar
2 votes
1 answer
75 views

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 `...
boldsinas101's user avatar
1 vote
2 answers
87 views

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 ...
Gallex's user avatar
  • 549
0 votes
1 answer
91 views

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 ...
Travis Fleenor's user avatar
0 votes
1 answer
276 views

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, ...
BTG123's user avatar
  • 147
0 votes
1 answer
3k views

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 ...
Akshay Vasu's user avatar
0 votes
0 answers
90 views

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 ...
Bobafotz's user avatar
0 votes
1 answer
360 views

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 ...
Cameron's user avatar
  • 53
-1 votes
2 answers
118 views

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 ...
Britney's user avatar
0 votes
2 answers
4k views

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 ...
Gifto's user avatar
  • 21
3 votes
1 answer
14k views

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, ...
Jim Fell's user avatar
  • 14.4k
0 votes
1 answer
1k views

SELECT k.*, y.exchange, ( SELECT close AS close_20, close_adj AS close_adj_20 FROM stocks k WHERE t = ( ...
Aoi's user avatar
  • 19
2 votes
3 answers
429 views

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 ...
Abigail Hardin's user avatar
0 votes
1 answer
84 views

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 ...
Chetan Kondawle's user avatar
0 votes
0 answers
33 views

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 ...
jasim's user avatar
  • 459
1 vote
1 answer
3k views

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 ...
HugoC4's user avatar
  • 51
0 votes
1 answer
784 views

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 ...
gabz's user avatar
  • 51
-1 votes
1 answer
356 views

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 ) ...
user3671437's user avatar
4 votes
3 answers
17k views

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 ...
user3507176's user avatar
0 votes
3 answers
1k views

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 "...
emma's user avatar
  • 11
1 vote
1 answer
125 views

I have a table, exposure, which looks like this: +------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------...
pkinsky's user avatar
  • 1,768
0 votes
1 answer
80 views

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,...
user3465377's user avatar
2 votes
1 answer
543 views

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 ...
jeffry's user avatar
  • 327
-4 votes
1 answer
2k views

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 ...
ABYR's user avatar
  • 1
-1 votes
1 answer
97 views

when i execute this query SELECT tbcategory.CATEGORY_ID, tbcategory.VENDOR_ID, tbcategory.CATEGORY_NAME, tbsubcategory.SUB_CATEGORY_ID, tbsubcategory.SUB_CATEGORY_NAME, ...
user3318237's user avatar
0 votes
1 answer
4k views

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. ...
hosker's user avatar
  • 584
0 votes
3 answers
2k views

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%'); ...
Portlight's user avatar
1 vote
1 answer
2k views

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....
enigmaticus's user avatar
0 votes
1 answer
866 views

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 ...
bmacuer's user avatar
  • 37
0 votes
2 answers
1k views

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 ...
Steve Price's user avatar
1 vote
3 answers
648 views

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 (...
Jim's user avatar
  • 1,357
10 votes
1 answer
51k views

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....
Marco's user avatar
  • 3,641
0 votes
1 answer
251 views

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 ...
Jack Trowbridge's user avatar
2 votes
1 answer
112 views

I have the following SQL statement: SELECT Office, COUNT(Office) As Tot_Part, (SELECT Office, COUNT(Office) FROM trespondent WHERE completion_status= 'Started' OR ...
Homer_J's user avatar
  • 3,323
4 votes
2 answers
10k views

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 ...
superTramp's user avatar
1 vote
3 answers
2k views

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)"...
Hernan's user avatar
  • 1,148
0 votes
3 answers
208 views

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 ...
Fabrizio Fenoglio's user avatar
0 votes
2 answers
1k views

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 ...
Fabrizio Fenoglio's user avatar