Microsoft
Software
Hardware
Network
Question : What is wrong with this query
Can someone show what is wrong with this query?
select R_NUMBER, Q_ID, `TEXT` from ANSWER
where R_NUMBER IN (SELECT * FROM REQUEST WHERE R_DATE_COMPLETED LIKE '2010%')
I get this error: 1241 - Operand should contain 1 column(s)
Answer : What is wrong with this query
Remove , R_STATUS as well... You cannot compare R_Number with two values.
It should be::
select R_NUMBER, Q_ID, `TEXT` from ANSWER
where R_NUMBER IN (SELECT R_NUMBER FROM REQUEST WHERE R_DATE_COMPLETED LIKE '2010%');
Random Solutions
Removing apostrohies from exported excel cells
Toshiba M115-S1061 with windows XP that has a hoarse, husky, scattered sound
error with web site when it was moved from server 2003 to 2008
Powerpoint Crashes when Formating graphs
SSIS import from Excel giving me nulls
Code Behind Value in Hyperlink Field
Index fragmentation
Hooking 5.1 Surround sound to xBox 360 premium
What is blocking Remote Desktop?
When is it most appropriate to use ADO vs. SQL statements and queries in a multi-user environment?