Tong Michael schrieb am 26.02.2015 um 21:23:
> 
> hey, guys, I came across a merge statement when I'm trying to convert stored 
> procedures from Mysql to Postgres:____
> 
> __ __
> 
> merge into db.ChargePeriod d____
> using (____
>     select ba.ClientID____
> ...
> ...

That can't be MySQL - MySQL does not have a MERGE statement. 
That looks much more like SQL Server's T-SQL (MERGE, @ style variables, 
convert() function...)

Here are several ways to do it: http://stackoverflow.com/q/1109061/330315

> I saw some people use "with upsert as", but my pgAdmin version(1.8) doesn't 
> support it. 

pgAdmin supports whatever your Postgres version supports. 
All supported/maintained Postgres versions support common table expressions.

What exactly do you mean with "doesn't support it"? What was the exact SQL 
statement you tried? 





-- 
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