Netezza / Puredata – How to replace or trim CHAR(0) is NULL characters in a field

Occasionally, one runs into the problem of hidden field values breaking join criteria.  I have had to clean up bad archive and conversion data with hidden characters serval times over the last couple of weeks, so, I thought I might as well capture this note for future use. I tried the Replace command which is … Continue reading Netezza / Puredata – How to replace or trim CHAR(0) is NULL characters in a field

SQL Server – how to know when a stored procedure ran last

This week I needed to know if a stored procedure was running when expected during our batch.  So, here is a quick couple of SQL to answer the question: When a Stored Procedure was run last This version of the SQL gives the date for the last time the Stored Procure was run: select distinct   … Continue reading SQL Server – how to know when a stored procedure ran last

Netezza / PureData – How to Substring on a Character

  I had a reason this week to perform a substring on a character in Netezza this week, something I have not had a need to do before.  The process was not as straightforward as I would have thought, since the command is explained as a static position command, and the IBM documentation, honestly, wasn’t … Continue reading Netezza / PureData – How to Substring on a Character

Oracle TO_CHAR to SQL Server CONVERT Equivalents to change Date to String

Transact SQL (T-SQL) When it comes to SQL I tend to lean on the SQL I have used the most over the years, which is Oracle.  Today was no exception, I found myself trying to use the TO_CHAR command in SQL Server to format a date, which of course does not work. So, after a … Continue reading Oracle TO_CHAR to SQL Server CONVERT Equivalents to change Date to String

SQL server table Describe (DESC) equivalent

Transact SQL (T-SQL) Microsoft SQL Server doesn’t seem have a describe command and usually, folks seem to want to build a stored procedure to get the describe behaviors.  However, this is not always practical based on your permissions. So, the simple SQL below will provide describe like information in a pinch.  You may want to … Continue reading SQL server table Describe (DESC) equivalent

Netezza / PureData – How To Get A List Of When A Store Procedure Was Last Changed Or Created

In the continuing journey to track down impacted objects and to determine when the code in a database was last changed or added, here is another quick SQL, which can be used in Aginity Workbench for Netezza to retrieve a list of when Store Procedures were last updated or were created. SQL List of When A Stored Procedure was … Continue reading Netezza / PureData – How To Get A List Of When A Store Procedure Was Last Changed Or Created

Netezza / PureData – How To Get a SQL List of When View Was Last Changed or Created

Sometimes it is handy to be able to get a quick list of when a view was changed last.  It could be for any number of reason, but sometimes folks just lose track of when a view was last updated or even need to verify that it hadn't been changed recently.  So here is a quick … Continue reading Netezza / PureData – How To Get a SQL List of When View Was Last Changed or Created