Single T-SQL query to swapping the values of two columns without using temporary column

How to swap the values of two columns of a table ? Let me explain the scenario with an example - Let's create a table named "Employees" with columns "First_Name" and "Last_Name". Then populate the table with some fictitious data. Then view the results once and then interchange the values in the "First_Name" and "Last_Name" columns... Continue Reading →

Calculation of metrics at database level or reporting level..? which is the best way..?

I just came across a same old situation of deciding where to do the calculation of certain metrics like percentages ? Here is my take on it with a fictitious example - Scenario 1:  Calculating it at database level and preserving it in the database: see Fig.:1(Associate Level Sales) showing a table with sales made by a few sales executives... Continue Reading →

Up ↑

%d bloggers like this: