A White Paper – Solving Relational Division problem in SQL – The Analyst Way

Hi readers..!! Here I go posting a white paper on one of the classical and intellectually challenging problems that an analyst might come across. The paper is titled - "Understanding and Solving Relational Division problems in SQL - The Analyst way". Hope you enjoy reading this paper. Please leave your comments and suggestions, if any, here.... Continue Reading →

Truncate time part from Datetime column or literal in Oracle SQL

I have shown how to truncate the time part from a datetime column value in SQL Server T-SQL in one of my previous posts here - https://pivotronics.wordpress.com/2012/12/19/comparing-datetime-column-with-a-date-literal-in-t-sql/ Here is the same (how to truncate the time part from a datetime column value) in Oracle SQL: TRUNC(datetime_column) or TRUNC(datetime_expression) very straight forward...!! isn't it.. ? 🙂

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 →

Up ↑