473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Postgresql Query return XML

Hi List,

I like to know, How I can execute this query in Postgresql.
Postgresql has a command similar to ... for xml auto, elements ???
Expand|Select|Wrap|Line Numbers
  1. SELECT [CLI_ID],[CLI_FIRSTNAME],[CLI_LASTNAME],[CLI_TELEPHONE]
  2.       ,[CLI_BIRTHDATE] ,[CLI_SEX],[CLI_STATUS]
  3.   FROM [MDSistemadeSeguros].[dbo].[CLIENTS] for xml auto,elements
  4.  
Because I like have this result in XML
Expand|Select|Wrap|Line Numbers
  1. <MDSistemadeSeguros.dbo.CLIENTS>
  2.   <CLI_ID>2</CLI_ID>
  3.   <CLI_FIRSTNAME>MARIAELIGIA</CLI_FIRSTNAME>
  4.   <CLI_LASTNAME>CHAVEZ</CLI_LASTNAME>
  5.   <CLI_TELEPHONE>239/2313102</CLI_TELEPHONE>
  6.   <CLI_BIRTHDATE>1965-07-22T00:00:00</CLI_BIRTHDATE>
  7.   <CLI_SEX>Masculino</CLI_SEX>
  8.   <CLI_STATUS>Desconocido</CLI_STATUS>
  9. </MDSistemadeSeguros.dbo.CLIENTS>
  10.  
Mar 25 '11 #1
1 113894
rski
700 Expert 512MB
See here
http://www.postgresql.org/docs/8.4/i...tions-xml.html
Mar 27 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ryan Booz | last post by:
All... I'm having problems figuring out what pg_query() really returns when there is an error. The documentation says it returns "FALSE", however, when I specifically make a bad query (either...
8
by: Adrian Parker | last post by:
Hi. I would like to query a database, given several where clauses to refine my search, and return the value of one single field in the database. eg: I have a table that lists teachers. Their...
3
by: shreedhar | last post by:
If I try to delete a record from my table which is giving following error Warning: PostgreSQL query failed: ERROR: pg_atoi: zero-length string in /xxx/database.inc on line 73 What might be...
3
by: Scott Ribe | last post by:
I'm using 7.3.2, invoke a small stored procedure via PQexec, and PQresultStatus returns PGRES_NONFATAL_ERROR. I can find nothing in the docs to help me understand what could cause this, and...
7
by: MLH | last post by:
?dcount("","qryOwnrsDueITSwMissingAddr") when run in the immediate window return a number greater than the number of rows that display when the saved query is run - opening in the database window?...
6
khalidbaloch
by: khalidbaloch | last post by:
i want to show on page the messege that say there is currently no item when a mysql query return no record instead of blank page .. i hope this is not a big issue and will be resolved in first reply...
2
by: HowHow | last post by:
Using Access 2000, normally query returns result horizontally. Is there any way to set the query to return result vertically? For example, my query shown the result as below: Heading ...
2
by: kkshansid | last post by:
same query return rows in mysql but not on php page while($rs = mysql_fetch_array($sql2)) { $town=$rs; $q="select * from institute where address like '%".$town."%'";//this query //echo $town;...
0
by: shajimon | last post by:
hai All I am very new to PostgreSql. I have given the following code to VB 6. and it takes around 2 to 3 minutes to exicute with PostgreSQL back end. However, the same code work in a fraction of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.