Netezza / PureData – How to convert a timestamp to date in SQL

  Since timestamps are integer, which are numbers, the date function can easily convert a timestamp to a date in Netezza SQL. Date Function Arguments, per IBM Documentation First argument data type Second argument data type Returns date numeric(8,0) date Example Timestamp to Date Conversion SQL In this example CREATEDATE is stored as a timestamp, … Continue reading Netezza / PureData – How to convert a timestamp to date in SQL

Netezza / PureData – ERROR [HY000] ERROR: Bad timestamp external representation ‘0000-00-00’

Bad timestamp external representation '0000-00-00' While working on a recent data conversion a data timestamp error occurred, where the legacy code and data was ‘0000-00-00’ default stamp, which was causing errors in Netezza/PureData Analytics (PDA).  ‘0000-00-00’ is not a valid timestamp in Netezza and will produce a ‘ ERROR [HY000] ERROR:  Bad timestamp external representation … Continue reading Netezza / PureData – ERROR [HY000] ERROR: Bad timestamp external representation ‘0000-00-00’

Netezza / PureData – How to convert an epoch field to a timestamp

How To Convert And Epoch Field To A Timestamp This is one of the items, which we need to do in Netezza SQL from time to time, but is not exactly obvious to the average SQL user.  So, having a pattern for making the conversion for an epoch field to a timestamp can be a … Continue reading Netezza / PureData – How to convert an epoch field to a timestamp

Netezza / PureData – CURRENT_TIMESTAMP Function

Netezza / PureData Analytics Current Timestamp The Current_Timestamp function, returns the current date and time, from PureData Analytics (Netezza) and is an easy way to retrieve the current timestamp via SQL. Example SQL Select CURRENT_TIMESTAMP as "Current Time"from _V_DUAL; Related Reference IBM PureData System for Analytics -SQL functionsPureData – Now() Command For Current DateNetezza – … Continue reading Netezza / PureData – CURRENT_TIMESTAMP Function

Netezza / PureData – how to set processing date to next day based on a timestamp

hey are a variety of uses for this logic within Netezza / Puredata SQL, when working with interfaces, ETL, ELT, Snapshot facts and/or tables, setting the processing / run control date, and the list goes on.  However, rather than reinventing this logic each time, I thought I would save this code snippet for future use … Continue reading Netezza / PureData – how to set processing date to next day based on a timestamp

Netezza / PureData – Now() Command For Current Date

PureData Analytics Now() Command There is more than one way to retrieve current date information from PureData Analytics (Netezza).  Using the Now() command is an easy way to retrieve the current date from within SQL. Example SQL Select now() as "Today"from _V_DUAL; Related Reference PureData – Current Date FunctionNetezza/PureData SQL Date Formatting ExamplesNetezza/PureData – How … Continue reading Netezza / PureData – Now() Command For Current Date