• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 83
  • Last Modified:

Oracle Update

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
David Lyons
Asked:
David Lyons
1 Solution
 
slightwv (䄆 Netminder) Commented:
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
 
David LyonsBI DeveloperAuthor Commented:
Added fldD to the SELECT, and fldA, fldB and fldCto the GROUP BY —found the duplicates.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now