Re: Simple SQL-syntax - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Simple SQL-syntax
Date
Msg-id web-105060@davinci.ethosmedia.com
Whole thread Raw
In response to Simple SQL-syntax  ("Fredrik Thunberg" <fredrik@datessa.se>)
List pgsql-sql
Fredrik,

> I have a very simple sql-question from an sql-beginner:

Sure.  Keep in mind that there is a pgsql-newbie list.  Also quite a few
good books on the topic, including: Database Design for Mere Mortals and
SQL for Smarties.

> Then I want to change all occurences of NrA in Table A to NrB...
>
> I've tried:
>
  UPDATE tableA Set tableA.nrA = B.nrB
  From tableB B Where tableA.nrA = B.nrA;

This should work.  What error message are you getting?  And what version
of Postgres are you using?

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Attachment

pgsql-sql by date:

Previous
From: "Michael Ansley (UK)"
Date:
Subject: RE: Simple SQL-syntax
Next
From: "Robby Slaughter"
Date:
Subject: RE: Simple SQL-syntax