Thread: help query

help query

From
rute solipa
Date:
hi everyone,

i've got this oracle query, and i need it to put it to work in potgresql 
platform, i think the right outer join it will do just fine, but i don't 
now where to put , can anyone help me:

select id_mensagem, ds_description, e_mail,
to_char(date,'DD/MM/YY - HH24:MI') as Date, assunto, respondidas,
mensagem, mensagens.id_respostafrom (select id_mensagem, ds_description, e_mail, date, assunto, 
mensagem, id_respostafrom tb_mensagens_monitoreswhere tb_mensagens_monitores.id_resposta is null) mensagens,(select
id_resposta,count(id_mensagem) as respondidasfrom tb_mensagens_monitores group by id_resposta) as respostaswhere
mensagens.id_mensagem= respostas.id_resposta(+)
 
order by date

kind regards,

rute



Re: help query

From
rute solipa
Date:
hi everyone,

does anyone can help me with this query, i need to now if it's a possible 
query and where do i put the join clause.

kind regards,

rute

At 21:26 28-04-2003 +0530, you wrote:


>Hmm as far i remember its the thrid of its kind
>in past one month :)
>
>dealing with oracle (+) join syntax :(
>
>On Mon, 28 Apr 2003, rute solipa wrote:
>
> > hi everyone,
> >
> > i've got this oracle query, and i need it to put it to work in potgresql
> > platform, i think the right outer join it will do just fine, but i don't
> > now where to put , can anyone help me:
> >
> > select id_mensagem, ds_description, e_mail,
> > to_char(date,'DD/MM/YY - HH24:MI') as Date, assunto, respondidas,
> > mensagem, mensagens.id_resposta
> >  from (select id_mensagem, ds_description, e_mail, date, assunto,
> > mensagem, id_resposta
> >  from tb_mensagens_monitores
> >  where tb_mensagens_monitores.id_resposta is null) mensagens,
> >  (select id_resposta, count(id_mensagem) as respondidas
> >  from tb_mensagens_monitores group by id_resposta) as respostas
> >  where mensagens.id_mensagem = respostas.id_resposta(+)
> > order by date
> >
> > kind regards,
> >
> > rute
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >



Re: help query

From
"Victor Yegorov"
Date:
* rute solipa <rutes@eselx.ipl.pt> [29.04.2003 13:36]:
> hi everyone,
>
> does anyone can help me with this query, i need to now if it's a possible
> query and where do i put the join clause.
>
> kind regards,

Go here:

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=queries-table-expressions.html

and read all about joins.

--

Victor Yegorov

Re: help query

From
Rajesh Kumar Mallah
Date:

Hmm as far i remember its the thrid of its kind
in past one month :) 

dealing with oracle (+) join syntax :(

On Mon, 28 Apr 2003, rute solipa wrote:

> hi everyone,
> 
> i've got this oracle query, and i need it to put it to work in potgresql 
> platform, i think the right outer join it will do just fine, but i don't 
> now where to put , can anyone help me:
> 
> select id_mensagem, ds_description, e_mail,
> to_char(date,'DD/MM/YY - HH24:MI') as Date, assunto, respondidas,
> mensagem, mensagens.id_resposta
>  from (select id_mensagem, ds_description, e_mail, date, assunto, 
> mensagem, id_resposta
>  from tb_mensagens_monitores
>  where tb_mensagens_monitores.id_resposta is null) mensagens,
>  (select id_resposta, count(id_mensagem) as respondidas
>  from tb_mensagens_monitores group by id_resposta) as respostas
>  where mensagens.id_mensagem = respostas.id_resposta(+)
> order by date
> 
> kind regards,
> 
> rute
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
>