By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,254 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,254 IT Pros & Developers. It's quick & easy.

Postgresql Query return XML

P: 1
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
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 700

Post your reply

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