Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle Update

Posted on 2016-09-23
2
Medium Priority
?
76 Views
Last Modified: 2016-09-26
Can someone tell me what this is doing?
Getting an error in SSIS that reads —Single row query returns more than one row.

UPDATE tblA
SET (fldA, fldB, fldC) = (
SELECT fldA, fldB, fldC FROM tblB
WHERE tblB.fldD = tblA.fldD)

Pulling apart the query, I can't find any duplicates.


Thank you —
0
Comment
Question by:David Lyons
2 Comments
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 41813229
Well, the select is returning more than one row for one of the fields.

See that this returns:
SELECT fldA, fldB, fldC FROM tblB group by fldD having count(*) > 1;
2
 

Author Closing Comment

by:David Lyons
ID: 41815993
Added fldD to the SELECT, and fldA, fldB and fldCto the GROUP BY —found the duplicates.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last 2 years, I have been working on SSIS 2008. Really the tough tasks in SSIS are to deploy packages and pass parameters (Values from outside package). The latter is certainly a headache for developers, particularly for me. We had to ma…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question