?
Solved

Oracle Update

Posted on 2016-09-23
2
Medium Priority
?
69 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 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

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…
Lessons learned during ten years of interviewing for SQL Server Integration Services (SSIS) and other Extract-Transform-Load (ETL) contract roles and two years of staff manager interviewing contractors.
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.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

719 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