Unix Technical Forum

Re: Compiere ERP and SQL quirks

This is a discussion on Re: Compiere ERP and SQL quirks within the pgsql Hackers forums, part of the PostgreSQL category; --> Andreas wrote: > Marek Mosiewicz wrote: > > Upps sorry now found it on TODO list. > > > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:13 AM
Merlin Moncure
 
Posts: n/a
Default Re: Compiere ERP and SQL quirks

Andreas wrote:
> Marek Mosiewicz wrote:
> > Upps sorry now found it on TODO list.
> >
> > I was not aware that it is SQL92 standard.
> >
> > Is it difficult to implement ?
> > Simplest approach would be
> > to rewrite it to UPDATE t1 set col1 = (select cola ...), col2 =

(select
> > colb....) ....
> > but it would result in not optimal plan.

>
> Doesn't something like
>
> UPDATE t1 SET col1=cola, col2=colb
> FROM t1 JOIN anothertable ot ON t1.id=ot.id
> WHERE ...
>
> Work the way you'd like it? I'd expect this syntax to be as widely
> portable and performant.


Hmm, 'from' in an update is a PostgreSQL extension to the update command
.

Merlin

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:13 AM
Andreas Pflug
 
Posts: n/a
Default Re: Compiere ERP and SQL quirks

Merlin Moncure wrote:
> Andreas wrote:
>


>>Doesn't something like
>>
>>UPDATE t1 SET col1=cola, col2=colb
>> FROM t1 JOIN anothertable ot ON t1.id=ot.id
>> WHERE ...
>>
>>Work the way you'd like it? I'd expect this syntax to be as widely
>>portable and performant.

>
>
> Hmm, 'from' in an update is a PostgreSQL extension to the update command
> .


Ooops... Oracle doesn't know it, I used to use it on MSSQL.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:55 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com