SOURCE CODE ATTRIBUTION: Before I proceed, I want to give credit to the original procedure by sfrejofsky based on which I created this procedure (mostly improvements). The source of this procedure is https://stackoverflow.com/questions/10404348/sql-server-dynamic-pivot-query I had a need to do dynamic PIVOTing for one of my projects and instead of reinventing the wheel, I used the … Continue reading SQL Server – Dynamically PIVOT ANY Column On ANY Table in ANY Database For ANY Aggregation With ANY Condition
CLOBs Not many tables demand the use of CLOBs (Character Large Objects). CLOB data type columns can store up to 4 GB of text. When designing a new application, developers face a dilemma – I need a column where I need to store a large block of text, should I use multiple VARCHAR2 columns or … Continue reading Oracle – CLOB vs. VARCHAR2 – When & When Not To Use?
Note: Although I wrote this in year 2012, it is still valid. If you are looking to convert rows to a CSV string and vice versa in Oracle, please read my related post on that here. If you are a serious PIVOT'er, I know that you would use Excel or Power Pivot or Power BI. … Continue reading SQL Server – PIVOT Data With TSQL
Whenever a need arises to convert a bunch of rows into a CSV string, typically, we spin up the editor to code a loop to concatenate strings and conversely parse the CSV string out to convert it into rows. Some of us have functions that we re-use. Although functions are better than copying and pasting … Continue reading Oracle – Convert Rows to CSV string and CSV string to Rows – Tablespaces and their Tables example