Re: Simple SQL-syntax

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "Fredrik Thunberg" <fredrik(at)datessa(dot)se>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Simple SQL-syntax
Date: 2001-08-20 15:13:05
Message-ID: web-105060@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

Attachment Content-Type Size
unknown_filename text/plain 2 bytes
unknown_filename text/plain 2 bytes
unknown_filename text/plain 2 bytes

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Ansley (UK) 2001-08-20 15:33:00 RE: Simple SQL-syntax
Previous Message Robby Slaughter 2001-08-20 14:55:47 RE: Simple SQL-syntax