Reputation: 11251
I use COALESCE
function to avoid ORA-01427 and pick up first non-null value.
COALESCE((
SELECT c.SCounts
FROM counts c
WHERE c.ID = 10000
), 0)
When I comment this code everything works well.
Upvotes: 0
Views: 478
Reputation: 518
I suppose the above COALESCE is embedded into a SELECT something like this:
SELECT
COALESCE((
SELECT c.SCounts
FROM counts c
WHERE c.ID = 10000
), 0)
FROM counts
If this is true, then the problem could be that this select will return as many rows as table COUNTS has.
Upvotes: 1