Serialize XML and save to Oracle with C# and ADO

Asked

Viewed 151 times

3

I wonder if there is something equivalent in Oracle for this select in SQL Server:

select NickName, ExternalId1 from Basics where externalId1 = @externalId1 for xml auto, elements;

And to this select down below:

select
x.n.value('OperationId[1]', 'int'),
x.n.value('Name[1]', 'varchar(50)'),
x.n.value('MaxTime[1]', 'float')
from @xml.nodes('/*[1]') x(n);

1 answer

1


For the first, yes. It looks the same, actually.

select NickName, ExternalId1 
from Basics 
where externalId1 = @externalId1 
for xml auto, elements;

As for the second, SQL Server accepts XPath, but I believe that to work, @xml needs to be populated with a query before.

  • let’s see if I got this select Nickname, Externalid1 from Basics Where externalId1 = @externalId1 for xml auto, Elements; in Sqlserver is the same for Oracle? Thank you.

  • 1

    @eddiedev Exactly.

  • Interesting. I thought it changed the way of sending this xml to an Oracle database. Thank you

  • 1

    @eddiedev If the Gypsy response has solved your problem, mark it as accepted, so that everyone can know how you solved your problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.