pass XML as an argument and INSERT (key/value pairs) in postgresql

Поиск
Список
Период
Сортировка
Искать

pass XML as an argument and INSERT (key/value pairs) in postgresql

От:
cesitarps <plicanhpc@gmail.com>
Дата:
hola amigos encontre este procedimiento pero quisiera pasarlo a postgresql ,
su ayuda sera de mucha importancia porfavor se los agradecere. 

¿ como seria en postgresql ....?

create procedure ParseXML (@InputXML xml)
as
begin
    declare @MyTable table (
        id int,
        value int
    )

    insert into @MyTable 
        (id, value)
        select Row.id.value('@id','int'), Row.id.value('@value','int') 
            from @InputXML.nodes('/Rows/Row') as Row(id)        

    select id, value
        from @MyTable
end
go

/* Create the XML Parameter */
declare @XMLParam xml
set @XMLParam = '
                     
                     
                     
                 '

/* Call the stored procedure with the XML Parameter */
exec ParseXML @InputXML = @XMLParam


--
View this message in context: http://postgresql.1045698.n5.nabble.com/pass-XML-as-an-argument-and-INSERT-key-value-pairs-in-postgresql-tp4594251p4594251.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
FAQ