XML RANT
EDIT: 1/12/2005 Hey Look! An Official He-Man XML Haters Club Thread
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=44577
Until someone can post some reason why XML in SQL Server is a good thing, I'm starting this Official XML Ranting Post.
I will start a list of why I dislike XML in SQL Server. My Ignorance is unbounded.
"Let's take the nice relational model and add to it hierarchical "capabilities" But let's make sure the data is stored in a text column, so they can get it out in chuncks, so they can the use these "tools" to parse it out into relational format, where it can be stored, and more easily accessed....
Did I mention I hate XML“
1. Because a Rant was requested
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=39339
2. Because My Ignorance is showing...how do you get xml out of sql server? Was having a conversation here ...interesting database...tried all the version of code snipets....no joy, expect to the QA result pane...what a PAIN
http://www.dbforums.com/showthread.php?p=3771308&posted=1#post3771308
USE Northwind
GO
CREATE VIEW myView99
AS
SELECT 1 as Tag,
NULL as Parent,
Customers.CustomerID as [Customer!1!CustomerID],
NULL as [Order!2!OrderID]
FROM Customers
UNION ALL
SELECT 2,
1,
Customers.CustomerID,
Orders.OrderID
FROM Customers, Orders
WHERE Customers.CustomerID = Orders.CustomerID
ORDER BY [Customer!1!CustomerID], [Order!2!OrderID]
FOR XML EXPLICIT
GO
CREATE TABLE myTable99(Col1 varchar(8000))
GO
INSERT INTO myTable99(Col1)
SELECT * FROM (
SELECT 1 as Tag,
NULL as Parent,
Customers.CustomerID as [Customer!1!CustomerID],
NULL as [Order!2!OrderID]
FROM Customers
UNION ALL
SELECT 2,
1,
Customers.CustomerID,
Orders.OrderID
FROM Customers, Orders
WHERE Customers.CustomerID = Orders.CustomerID
ORDER BY [Customer!1!CustomerID], [Order!2!OrderID]
FOR XML EXPLICIT) AS XXX
GO
CREATE PROC mySproc99
AS
SELECT 1 as Tag,
NULL as Parent,
Customers.CustomerID as [Customer!1!CustomerID],
NULL as [Order!2!OrderID]
FROM Customers
UNION ALL
SELECT 2,
1,
Customers.CustomerID,
Orders.OrderID
FROM Customers, Orders
WHERE Customers.CustomerID = Orders.CustomerID
ORDER BY [Customer!1!CustomerID], [Order!2!OrderID]
FOR XML EXPLICIT
GO
EXEC mySproc99
INSERT INTO myTable99 EXEC mySproc99
GO
DROP TABLE myTable99
DROP PROC mySproc99
GO
3. Because of this
http://weblogs.sqlteam.com/mladenp/archive/2009/12/01/SQL-Server-Network-packet-size-difference-between-returning-XML-and.aspx