agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>
To: pgsql-sql@postgresql.org
Subject: Re: SQL conversion help
Date: Fri, 19 May 2017 21:07:40 -0700
Message-ID: <91052907-df30-2c98-a058-3f88dd204059@aklaver.com> (raw)
In-Reply-To: <025d01d2d11d$cb2ebba0$618c32e0$@1nar.com.tr>
References: <025d01d2d11d$cb2ebba0$618c32e0$@1nar.com.tr>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On 05/19/2017 09:01 PM, Ertan Küçükoðlu wrote:
> Hello,
> 
> I have below SQL script used in SQL Server. I would like some help to
> convert it into PostgreSQL format, please.
> 
> DECLARE @satirno INT
> SET @satirno = 0
> UPDATE urtrecetedet
> SET @satirno = satirno = @satirno + 1
> WHERE recetekodu = 'ASD'

I would suggest taking a look at:

https://www.postgresql.org/docs/9.6/static/plpgsql.html

In particular:

https://www.postgresql.org/docs/9.6/static/plpgsql-structure.html

https://www.postgresql.org/docs/9.6/static/plpgsql-declarations.html

https://www.postgresql.org/docs/9.6/static/plpgsql-statements.html

> 
> Thanks & regards,
> Ertan Küçükoðlu
> 
> 
> 
> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


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



view thread (5+ messages)  latest in thread

Message-ID: <91052907-df30-2c98-a058-3f88dd204059@aklaver.com>
Permalink:  ../91052907-df30-2c98-a058-3f88dd204059@aklaver.com/
Also on:    postgresql.org/message-id/91052907-df30-2c98-a058-3f88dd204059@aklaver.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adrian.klaver@aklaver.com, ertan.kucukoglu@1nar.com.tr
  Subject: Re: SQL conversion help
  In-Reply-To: <91052907-df30-2c98-a058-3f88dd204059@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox