473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Once more: Subquery returned more than 1 value.

1 New Member
Hi All,

I tried to find the solution for my problem, but i couldn't find it. If my problem is already solved somewhere, please provide me the link...

I'm not a developer myself, but the application manager who needs to solve the issue :) I have got a problem with out software. It throws an error (Subquery returned more than 1 value, blablabla) at me and I cannot see why.

I have this data which is stored in an XSD file. The query is the following:

UPDATE AddressBookMemb er
SET Bounced = 0
WHERE (UserID = @UserID) AND (AddressBookID = @AddressBookID) AND (Bounced = 1)

The parameters are defined as:

<Parameter AllowDbNull="Fa lse" AutogeneratedNa me="UserID" ColumnName="Use rID" DataSourceName= "manymail.dbo.A ddressBookMembe r" DataTypeServer= "int" DbType="Int32" Direction="Inpu t" ParameterName=" @UserID" Precision="0" ProviderType="I nt" Scale="0" Size="4" SourceColumn="U serID" SourceColumnNul lMapping="False " SourceVersion=" Original">
</Parameter>
<Parameter AllowDbNull="Tr ue" AutogeneratedNa me="AddressBook ID" ColumnName="Add ressBookID" DataSourceName= "manymail.dbo.A ddressBookMembe r" DataTypeServer= "int" DbType="Int32" Direction="Inpu t" ParameterName=" @AddressBookID" Precision="0" ProviderType="I nt" Scale="0" Size="4" SourceColumn="A ddressBookID" SourceColumnNul lMapping="False " SourceVersion=" Original">
</Parameter>


The query get called with the following tag:

Dim abMember As New AddressBookMemb er
abMember.Update BouncedToUnboun ced(UserID, AddressBookID)



The query isn't stored as a trigger, and cannot be stored as a trigger in the database (for now).

Does anyone know how to re-arrange the query so that it works like it should?

Thanks many times!
Tim
Sep 5 '07 #1
0 1303

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2061
by: Nachi | last post by:
Hi, Urgent Help appreciated.... I am getting resultset with first condition and when try to get the resutlset from second condition i am getting the above error in SQL200. I know that i am getting more then one value in the second condition but even i am getting more then one value in my first statement
4
3826
by: Kenny G | last post by:
Below is a query that I currently have. I need to produce a subquery so that the top five of the CodeCount is returned. I appreciate your help. SELECT .PX_SURGEON, .PX_CODE, Count(.PX_CODE) AS CodeCount, .PX_TITLE FROM INNER JOIN ON .PX_CODE = .PX_CODE GROUP BY .PX_SURGEON, .PX_CODE, .PX_TITLE ORDER BY .PX_SURGEON, Count(.PX_CODE)
5
6595
by: Rod | last post by:
I have a client site where the code below has been working happily for at least four months. The site is using SQL Server 7. The code is ASP.NET Last week an error appeared related to the following SQL statement. INSERT INTO OrderItems (ClientID, ProductID, OrderHeaderID, Quantity, Dispatched, BackOrdered) SELECT ClientID, ProductID, 1371 AS OrderHeaderID, Quantity, Dispatched, BackOrdered FROM Basket WHERE RequisitionID = 1369 The...
6
34929
by: phillip.s.powell | last post by:
update student s set school_year_id = (select distinct s.id from school_year s, interns i where lower(s.school_year_name) = lower(i.enrollment_year)and s.unique_key = i.unique_key group by s.id); ERROR 1242 (21000): Subquery returns more than 1 row I am trying to replace a column in interns.student.school_year_id to read an ID from the school_year table, where school_year_name will map to interns.interns.enrollment_year I can't for...
3
2921
by: Shals | last post by:
Hi, I'm using Form and a subform control within that form. Main form is getting data from one table(Buildings) and subform is getting data from another table(BldgDataByFloor). but both the form and subform are linked through a child field which is common in both the tables(BuildingNumber). Now, whenever I close the form I receive an error "Subquery returned more than 1 value. This is not permitted when the
0
1281
by: fubaba | last post by:
hi, i execute a store procedure got Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.' message is there any one help with these codes below ....... SET @strSQL = (@strSQL + ' AND p.PropertyID NOT IN ( ' + (SELECT DISTINCT a.propertyID FROM propertyAvailability a ...
1
2245
by: Aleck | last post by:
Hie. I have a trigger that monitors changes to my table fields but I get an error saying subquery returned more than one value.Below is the code for my trigger, hope you will figure out whats happening.. CREATE TRIGGER trgmyTableAuditFields ON myTable WITH ENCRYPTION FOR INSERT, UPDATE, DELETE AS BEGIN
3
11395
by: jideesh | last post by:
---------------trigger code create trigger DeletepurchaseItems on table_purchaseitems for delete,update as begin select * from deleted update table_STOCK set ostock=(ostock-(select sqty from deleted)) where itemcode=(select itemcode from deleted)and coid=(select compid from deleted) and fycode=(select financialyear from deleted) end
7
1767
by: blabla2006 | last post by:
I have a stored procedure that calls another stored procedure on a different server. I get the error i wrote above. The first procedure is: set @DB_NAME = (select db_name from all_servers where server_no = @server_no) set @SERVER_ADDRESS = (select server_address from all_servers where server_no = @server_no) DECLARE @exec_statement varchar (100) select @exec_statement = '.' + @DB_NAME + 'dbo.DeleteUsers' exec @exec_statement the second...
0
9641
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.