PowerShell – Case-insensitive String Replacement

The problem: Replace "a" with "b" case-insensitively You have a simple string and you want to replace all "a" with "b" in a case-insensitive manner. First attempt (fail): PS C:\Windows\system32> [string] $someString = 'aAaAaAaA' $SomeString.Replace('a', 'b') #Result bAbAbAbAbA What happened? The [string].Replace() method is case-sensitive Second attempt (looks like it works but not quite): PS … Continue reading PowerShell – Case-insensitive String Replacement

Oracle – CLOB vs. VARCHAR2 – When & When Not To Use?

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?

Oracle – Convert Rows to CSV string and CSV string to Rows – Tablespaces and their Tables example

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