Viewing 15 posts - 1 through 15 (of 140 total)
Hi,
You can achieve this by using a predicate to target the attributes, here is something that will hopefully get you on the right track:
DECLARE @xml XML =...
August 5, 2022 at 1:50 pm
Hi, what you could do is to use a second cross apply within the same query to join on the other data. I've also tweaked the query to use the...
August 13, 2015 at 12:43 pm
No problem.. thanks for the feedback 🙂
January 28, 2015 at 8:08 am
I've just run your query, using a temp table of the same name + example xml, and it works fine.
CREATE TABLE #xNESP_XmlImportPOData (xml_data XML)
INSERT INTO #xNESP_XmlImportPOData (xml_data)
VALUES ('<message>
...
January 28, 2015 at 7:44 am
ok. i just did a quick google and there were a number of free online xsd from xml generators on the first page. not tried any myself so can't comment...
January 18, 2015 at 7:28 am
Also is there any software that will create a schema from an XML file?
You can use visual studio to create a schema from an xml document, and generally it will...
January 18, 2015 at 2:47 am
One option that I often use for ad-hoc imports of XML if you can get the xml files onto the SQL server is this method:
declare @xml xml
SELECT @xml = BulkColumn...
January 18, 2015 at 2:36 am
No problem, thanks for the feedback.. Happy new year to you too.
December 31, 2014 at 4:41 am
Hi, glad you got to the bottom of it!.
I think I understand what you are trying to do i.e. show the fragmentation as a percentage i.e. 85.5%? If so then...
December 30, 2014 at 3:35 pm
Hi. At face value, the xpath is correct for the xml example that you have posted so at this point I'd go and do some sanity checks on the base...
December 30, 2014 at 3:23 am
BWFC (12/11/2014)
Carlo Romagnano (12/11/2014)
Extremely easy!The answer is in the title!
😀
The answer might be in the title, but as a newbie I went through my usual process of reading the question,...
December 11, 2014 at 1:25 am
Here is a slightly different take on the suggestion by Eirikur that achieves the same but without querying the system views. I've also opted to use dynamic sql to generate...
November 24, 2014 at 8:21 am
Here is another method which gets the NomProcess node immediately following the IdProcess node of the value that you specify
DECLARE @xml XML
SET @xml = '<Status>
<IdStatus>1</IdStatus>
<NomStatus>Status 1</NomStatus>
<IdStatus>2</IdStatus>
<NomStatus>Status 2</NomStatus>
<IdStatus>3</IdStatus>
<NomStatus>Status 3</NomStatus>
</Status>
<Process>
<IdProcess>3</IdProcess>
<NomProcess>Process 3</NomProcess>
<IdProcess>2</IdProcess>
<NomProcess>Process...
November 10, 2014 at 1:47 pm
I know that this thread is a week old and Eirikur has already provided a potential solution but I'd thought I'd add some comments + another solution as well. Firstly...
November 7, 2014 at 5:30 am
Hi, you can do it by using a namespace. Here is a not so elegant way of getting the value out:
DECLARE @xml XML = '<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/">
<xs:schema id="NewDataSet"...
July 24, 2014 at 1:07 pm
Viewing 15 posts - 1 through 15 (of 140 total)