March 22, 2007 at 3:32 am
hello everyone, i have the following query:
INSERT INTO ListingInstantPurchases (MemberID, UserShipping, eStoreID, Quantity, ListingID, ListingCost, TotalListingCost, ShippingCost, TotalShippingCost, InsuranceCost,
TotalInsuranceCost, TaxCost, TotalTaxCost)
SELECT MemberID, UserShipping, eStoreID, Quantity, ListingID, ListingCost, TotalListingCost, ShippingCost, TotalShippingCost, InsuranceCost, TotalInsuranceCost,
TaxCost, TotalTaxCost
FROM ShoppingCart
WHERE MemberID = 10
but it gives me the following error: "Subquery returned more than 1 value. This
is not permitted when the subquery follows =,!= so on plz help me how can i copy data from i table to my already existing other table as i want to copy few columns not the whole table data.
plz help me
March 22, 2007 at 5:19 am
Hi....
I think this should not be the problem as this query is correct. You can very well insert the values. I dont think that this should be the case with this query until and unless you have triggers defined on that table on which you are inserting. Just check out for the dependency of that table for the trigger. May be this can just solve your problem. The query is perfectly correct.
Amit
Amit Tiwari
Software Engineer
Westbase Technology Pvt Ltd
Pune
March 22, 2007 at 5:39 am
hi
yes trigger might be the cause of the problem.
"Keep Trying"
March 23, 2007 at 11:15 am
You may want to try SELECT INTO.
March 23, 2007 at 11:52 am
Your query (as posted) cannot possibly return the error in your post. This is a very straight forward error and there must be a sub-query involved where you are comparing the results to a single value. Is there some other code surrounding the INSERT that you've posted? If not, check the triggers as previously suggested.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply