Tagged Questions
1
vote
1answer
99 views
SQL Server stored procedure working when run manually, not running from SQL Server Agent
I have a procedure that runs fine using the execute command in SSMS, however putting the same command in a job gives the following error.
line 9, character 9, unexpected end of input
The code ...
2
votes
0answers
114 views
Transform XPath map into XML document using relational data
Background
Most modern databases have XML functions that can be used to extract data in an XML format. I want to avoid the task of manually calling XML functions to extract the data.
This problem ...
0
votes
2answers
324 views
how to select * from XML where id=1?
declare @xml xml,
declare @num int
set @num = 1
set @xml = '
<row>
<Id>1</Id>
<name>reza</name>
</row>
<row>
<Id>2</Id>
...
0
votes
1answer
111 views
avoid insert xml duplicate data
how can to prevent duplicate inserts for every Execute?
insert into IQ (XMLDT)values('<row>sdsdf</row>')
1
vote
1answer
360 views
Trying to Build TreeView Query in T-SQL
I have parent records in two tables, Table1 and Table2. Some records in Table3 are children of Table1, and some are children of Table2.
I would like to build a query that I can use to populate a ...
1
vote
1answer
387 views
SQL Database to XML?
I would like to export SQL data to an XML file so it can be read in COBOL. I am working with SQL Express 2008 r2.
2
votes
3answers
106 views
Document versioning
I want to store in SQL Server 2008 XML files, but in a way that versioning is supported.
For example, I have a XML document and I save it in the DB(in the XML datatype column). After that, I edit it. ...
0
votes
1answer
223 views
Returning Multiple Result-Sets or Single XML Blods
I've been writing some new Stored Procedures, and find myself returning between 6-8 result-sets in a few cases. I've always worked under the assumption that there were certain inefficiencies with ...
1
vote
2answers
2k views
SQL Xml returning empty root tag on empty record set
I am working on xml explicit to generate user defined nodes in xml output using Sql Server 2005 Express edition. The below code works fine, just that i couldn't manage to generate a empty node when ...
1
vote
2answers
666 views
SQL statement to combine main table and child table as columns?
Having a main table and a child table in a Microsoft SQL Server database (2005+), I want to show the user a single table in a grid view which includes rows from the main table and rows from the child ...
1
vote
1answer
606 views
Select statement to retrive xml output as below
Hi could someone provide me some clues or solution to retrive record sets like below
note: i read the msdn documentation but leads me no where but hair loss :(
Just for the assumption think i have 2 ...
3
votes
2answers
1k views
Select XML values when attribute involved
I have a table that stores XML values in field: OtherData.
An XML value from one row:
< file path="C:\WINDOWS\system32\svchost.exe" />
I would like to select all rows that have an ...
3
votes
1answer
8k views
trying to turn XML into heirarchical SQL tables, can anyone provide a good explanation of two parts of this code example?
I am trying to learn how to turn XML into heirarchical SQL tables.
I have found an old code snippet from a Microsoft forum which is basically what I am trying to do, but I was wondering if someone ...

