Solved

Oracle Update

Posted on 2016-09-23
2
39 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 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
SQL Server  2012 Release with lots of Enhancements in Database Engine functions, SSIS, SSRS and some of new services like Data Quality Server and Master Data Service. Of particular interest, and the focus of this Article is SSIS. So, time to elab…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to recover a database from a user managed backup

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now