I am sure that all of you are already familiar with the extended stored procedure xp_ReadErrorLog and its less flexible and published equivalent sp_ReadErrorLog (which takes less parameters) for reading the SQL Server Error Log. xp_ReadErrorLog - To read current error log: The extended stored procedure xp_ReadErrorLog is very useful. It helps with reading the … Continue reading SQL Server: A More Flexible xp_ReadErrorLog That Reads All Error Logs Including Archives
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
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?
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