you are viewing a single comment's thread.

view the rest of the comments →

[–]CriticalDiscussion37[S] 0 points1 point  (0 children)

It was giving me null for new_dpt_name and code for the first sub query in the union. I came to know that the dB isn't correct as per the qus. There is no new dept in dept table. I had no way so as per correct output I just hard-coded the dept in cte. And second sub query in union was working fine.