On Thu, 15 Sep 2011, Andy Colson wrote:

Trim it up:
andy=# select '['|| rtrim(trim(trailing E'\n' from a)) || ']' from junk;

Andy,

  Scrolling through the table with rows ordered by date and chemical I find
no duplicates ... so far. However, what I do find is that the above did not
work:

 GW-22   | 1998-12-16  | Zinc                    |  0.01
 GW-22   | 1998-12-16  | pH                      |  7.83
 GW-22  +| 1999-03-09  | Alkalinity, Bicarbonate |    97
         |             |                         |
 GW-22  +| 1999-03-09  | Alkalinity, Total       |    80
         |             |                         |
 GW-22  +| 1999-03-09  | Aluminum                |  0.01
         |             |                         |
 GW-22  +| 1999-03-09  | Antimony                |

  As my previous message noted, selecting rows with two spaces before the
newline returned 0 rows.

  I'll continue looking for duplicates, but I suspect there are none. I just
need to get rid of the newlines, drop all rows for site_id from the
chemistry table, then insert the cleaned rows from the junk table.

Regards,

Rich

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to