In EMP table, for those emp whose Hiredate is same, update
their sal by "sal+500" or else for others keep the sal as it
is, how to do it by SQL query

Answer Posted / sanjaygupta1981

UPDATE emp
SET sal=sal+500
WHERE hiredate IN (SELECT hiredate
FROM employees
HAVING COUNT(*)>1
GROUP BY hiredate)

The above query will update the records of all those employees
whose hiredate is same.

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features of complex mapping?

631


Hi, I saw one mapping implemented by my seniors . In Expression transformation they implemented following logic. That is iif(is_date(in_UC_DATINV,'YYYYMMDD'),to_date(in_UC_DATINV,'Y YYYMMDD'),'Inventory Date is either invalid or null') Inventory_Date is validated only for is_date() But not validated for notisnull() . But error says “ either invalid or null “ why? Whether is_date() also check for not isnull() ? or in this logic something is different ? Please answer me . Advance thanks

1399


Suppose we configure sorter transformations in the master and detail pipelines with the following sorted ports in order: item_no, item_name, price. When we configure the join condition, what are the guidelines we need to follow to maintain the sort order?

646


What is enterprise data warehousing?

601


What is Index Caches size?

605






server hot-ws270 is connect to Repository B. What does it mean?

1843


How can we delete duplicate rows from flat files?

730


How can you increase the performance in joiner transformation?

695


What are the static cache and dynamic cache in informatica?

701


How many input parameters can exist in an unconnected lookup?

979


Write the advantages of partitioning a session?

738


What you know about transaction control transformation?

546


What is DR strategy for Informatica project?

686


where to store informatica rejected data?

667


What are batches?

607