Solved

Oracle Update

Posted on 2016-09-23
2
58 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

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…
My client has a dictionary table. They're defining a list of standard naming convention. Now, they are requiring my team to provide us a mechanism how to match new incoming data with existing data in their system.
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
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

730 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