1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Rep Power

    How to Reverse string?

    Hello everyone,

    In postgresql, I have string: "One,two,Three" and how to I Reverse it to "Three,Two,One"? hepl me, pleases.

    Thanks all
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Rep Power

    I smell a 1NF violation.

    Why do you even have this strange string, and what do you need it for? If you store your data as comma-separated strings, you're doing it wrong (see the link above). As a rule of thumb: When you need complicated string operations, it's usually a warning sign telling you that your data model is incorrect or that you're doing things with PostgreSQL which you should be doing with your application.
    The 6 worst sins of security How to (properly) access a MySQL database with PHP

    Why cant I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo