Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2014

    Unanswered: Find and replace

    I am not a programmer and I need some help. I am having a website made for me. One of the things I have to do is change some numbers in formulas in one column to subscripts. Example: Na(Li,Al)3Al6(BO3)3Si6O18(OH)4

    I want to change the data from Na(Li,Al)3Al6(BO3)3Si6O18(OH)4 to Na(Li,Al)<sub>3</sub>Al<sub>6</sub>(BO<sub>3</sub>)<sub>3</sub>Si<sub>6</sub>O<sub>18</sub>(OH)<sub>4</sub>

    Doing this manually is taking forever but for the life of me I cannot figure out how do this using PG Admin III 1.16.1

    I'm sure it is probably easy but I have been all over the web and can't find the answer. Some help would be greatly appreciated. Thanks.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Welcome to DBForums!

    I understand your pain... It is hard to find what you need when you aren't sure what it the little beggar is called!

    Return to the 9.7. Pattern Matching section of the PostgreSQL documentation. You probably need to read most of the section, but pay special attention to the regexp_replace() function, since it is the key to what you want to accomplish.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Apr 2014


    Thanks for the direction, Pat. This seems like it will be very helpful. I'll give it a go right after I do my taxes

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts