It was not intentionally made, but was remaining due to copy-paste from
other queries. It is only one occurrence of unnecessary casting. I got the
idea about such a query from an oracle pl/sql book.
C P Kulkarni
On Sat, Jan 21, 2012 at 11:03 PM, Pavel Stehule wrote:
> 2012/1/21 c k :
> > I have
2012/1/21 c k :
> I have written a query as follows
>
> select xmlelement(name accgroup, xmlforest(accgroupid, accgroupname,
> xmlforest(refaccdocid,d, c) as doc))::xml AS xmldata
> from (select 'acc group' as accgroup, accgroups.accgroupid,
> accgroups.accgroupname, 'docs' as doc, act.refaccdoci
I have written a query as follows
select xmlelement(name accgroup, xmlforest(accgroupid, accgroupname,
xmlforest(refaccdocid,d, c) as doc))::xml AS xmldata
from (select 'acc group' as accgroup, accgroups.accgroupid,
accgroups.accgroupname, 'docs' as doc, act.refaccdocid, sum(act.debit) as
d, sum
Hello
there are others SQL/XML functions - with this function, you can
create xml like you need
http://www.postgresql.org/docs/9.1/static/functions-xml.html
Regards
Pavel Stehule
2012/1/21 c k :
> Hi friends,
>
> I am working with some xml exporting functionality of our application. I am
> te
neral@postgresql.org
> *Subject:* [GENERAL] grouping of query data in xml
>
> ** **
>
> Hi friends,
>
> I am working with some xml exporting functionality of our application. I
> am testing query_to_xml function supported in PostgreSQL 9.1. XML output
> sho
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of c k
Sent: Saturday, January 21, 2012 10:23 AM
To: pgsql-admin; pgsql-general@postgresql.org
Subject: [GENERAL] grouping of query data in xml
Hi friends,
I am working with some xml exporting
Hi friends,
I am working with some xml exporting functionality of our application. I am
testing query_to_xml function supported in PostgreSQL 9.1. XML output
should be
1
COMPANY ACCOUNT
638168
1.
0.
638168
0.
1.
but the output is as follows:
a