Thursday, January 9, 2014

REPLACE Function in Netezza

Replace function in Netezza is similar to Oracle replace function.
You can replace any character/set of characters in a string with a required character/set of characters(or) numbers (or) special symbols as per requirement.

Given below is the example:

Select REPLACE('pageup','up',down');

output would be : pagedown
=======

Hope it will be Help!!

6 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. Your example of replace function is incorrect.

    ReplyDelete
    Replies
    1. Hi,

      Sry , i missed the single quote before down word..
      Please try with this Select replace('pageup','up','down')
      and let me know still u have a doubt !


      Thanks for writing !!!

      Delete
  3. Loading and Unloading Tables - http://www.21cssindia.com/courses/netezza-developer-online-training-21.html
    Statistics - Zone Maps - Clustered Base Tables - Materialized Views - Groom - Sequences - Transactions - Query and System Optimization - Nz commands - Backup and Restore - Creating user and User management - Query History - Managing Workloads - Managing Events - Employees to learn at their own pace and maintain control of learning “where, when and how” with boundless access 24/7by 21st Century Software Solutions. contact@21cssindia.com ---- Call Us +919000444287

    ReplyDelete
  4. How do I convert text like 2013/0009 or 1919/** to a date

    ReplyDelete
  5. Hi, You can use the to_date function in Netezza to convert text data type to date data type.

    Syntax : to_date(text,template)
    Ex:
    SELECT TO_DATE('2019','YYYY');
    SELECT TO_DATE('2019-03','YYYY-MM');
    SELECT TO_DATE('2019-03-01','YYYY-MM-DD');

    ReplyDelete