Re: simple? query

From: "Relyea, Mike" <Mike(dot)Relyea(at)xerox(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Cc: "Jan Verheyden" <jan(dot)verheyden(at)uz(dot)kuleuven(dot)ac(dot)be>
Subject: Re: simple? query
Date: 2009-08-14 14:21:55
Message-ID: AF7D9319B29A0242A33C3BF843BD313308A20682@USA7061MS03.na.xerox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> From: Jan Verheyden [mailto:jan(dot)verheyden(at)uz(dot)kuleuven(dot)ac(dot)be]
> Sent: Friday, August 14, 2009 9:03 AM
> To: Relyea, Mike
> Subject: RE: [SQL] simple? query
>
> The goal is, where uid not equals to 'janvleuven10' a new
> record should be inserted with the uid, and registered=0
>
> Regards,
>
> Jan

So if a record is found you want to update it and if a record isn't
found you want to insert it. I think you'll probably want to use
plpgsql http://www.postgresql.org/docs/8.4/static/plpgsql.html or some
other language like Jasen suggested. I don't know of a way to do this
with straight sql.

Mike

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tim Landscheidt 2009-08-14 14:53:16 Re: simple? query
Previous Message Joshua Tolley 2009-08-14 13:24:16 Re: Field or record level encryption / decryption