-
SQL Query Error
I am getting an error that states single-row subquery returns more than one row:
Unique_id and org_unit are integers
update main_t set unit_descr = (select unit_desc from org_units, main_t
where unit_descr is null and unique_id = org_unit)
Please help!
Thanks...
-
Ensure your subquery returns single row.
-
update main_t set unit_descr = (select unit_desc from org_units, main_t
where unit_descr is null and unique_id = org_unit)
In ur query above ur using = operator which takes only single value instead try using in operator. Or in subquery u can use top 1 key word according to ur requirement.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|