Agile Development, Architecture, .NET and The Art of Listening  RSS 2.0

Navigation
 Sunday, September 21, 2008
Sunday, September 21, 2008 4:35:44 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
LINQ | SQL Server
 Monday, April 21, 2008
Monday, April 21, 2008 9:09:55 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
Agile | Database design | SQL Server | Tools | Unit Testing
 Tuesday, February 12, 2008
Using XQuery to Manage XML with SQL Server 2005
http://www.informit.com/articles/article.aspx?p=468058

XQuery 1.0: An XML Query Language
http://www.w3.org/TR/xquery/

XML Support in Microsoft SQL Server 2005
http://msdn2.microsoft.com/en-us/library/ms345117.aspx

Performance Optimizations for the XML Data Type in SQL Server 2005
http://technet.microsoft.com/en-us/library/ms345118.aspx
Tuesday, February 12, 2008 6:52:24 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
Helped with work | SQL Server | Web Services | XML
 Thursday, February 07, 2008
Thursday, February 07, 2008 7:57:27 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
BI | Cool | SQL Server
 Saturday, January 26, 2008
Saturday, January 26, 2008 10:14:55 AM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
Cool | SQL Server | Tools | Useful stuff
 Tuesday, January 15, 2008
Tuesday, January 15, 2008 12:25:52 AM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
SQL Server | Tools | Useful stuff
 Sunday, January 06, 2008
An Overview of XML Support in SQL Server 2005
http://www.15seconds.com/issue/050803.htm

Improving XML Data Access Performance with SQL Server 2005
http://www.15seconds.com/issue/050811.htm

Improving XML Update Performance with SQL Server 2005
http://www.15seconds.com/issue/050818.htm

Sunday, January 06, 2008 2:34:24 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | Performance Tuning | SQL Server | T-SQL | Useful stuff | XML
 Friday, December 28, 2007
Friday, December 28, 2007 11:10:14 AM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | Helped with work | SQL Server | T-SQL | Useful stuff
 Thursday, December 27, 2007
Thursday, December 27, 2007 5:26:09 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | Cool | Helped with work | SQL Server | T-SQL | Useful stuff
 Wednesday, December 26, 2007
Wednesday, December 26, 2007 4:11:21 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | Cool | Helped with work | SQL Server | T-SQL | Useful stuff
 Monday, December 24, 2007

USE AdventureWorks;
GO
-- Passing values as constants.
EXEC dbo.uspGetWhereUsedProductID 819, '20050225';
GO
-- Passing values as variables.
DECLARE @ProductID int, @CheckDate datetime;
SET @ProductID = 819;
SET @CheckDate = '20050225';
EXEC dbo.uspGetWhereUsedProductID @ProductID, @CheckDate;
GO
-- Try to use a function as a parameter value.
-- This produces an error message.
EXEC dbo.uspGetWhereUsedProductID 819, GETDATE();
GO
-- Passing the function value as a variable.
DECLARE @CheckDate datetime;
SET @CheckDate = GETDATE();
EXEC dbo.uspGetWhereUsedProductID 819, @CheckDate;
GO



http://msdn2.microsoft.com/en-us/library/ms189915.aspx
Monday, December 24, 2007 3:33:32 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | Performance Tuning | SQL Server | T-SQL | Useful stuff
Monday, December 24, 2007 3:30:49 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | Performance Tuning | SQL Server | When things go wrong
http://www.msdner.com/dev-archive/84/19-85-847101.shtm

SELECT
Cast(a.XML_Data as XML) as XML_Data
FROM OPENQUERY([LINKED SERVER NAME HERE],'
SELECT
Cast(XML_Data as Varchar) as XML_Data
FROM
[DATABASE NAME].[SCHEMA].[TABLE NAME]'
) A

Basically, the data is queried on the remote server, converts the XML data to a varchar, sends the data to the requesting server and then reconverts it back to XML.

StephenDudzic at 2007-9-3 22:09:22 >

"Re: XML data type not supported in Distributed Queries This is a limitation in SQL Server 2005. Columns of xml type or CLR type cannot be queried directly or referenced from one server to another - this means the following:
  1. You cannot use a table or view that contains xml or clr type as 4-part name in your query
  2. You need to cast the column to either nvarchar(max) or varbinary(max) or other appropriate type to use
  3. If you have a table that has xml type for example then you need to create a view that contains all columns other than xml and query it instead. Or you can issue a pass-through query using OPENQUERY with the appropriate columns only."
Monday, December 24, 2007 3:26:18 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | SQL Server | T-SQL | When things go wrong
Monday, December 24, 2007 3:21:30 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | SQL Server | T-SQL | When things go wrong
 Sunday, December 23, 2007
Sunday, December 23, 2007 7:05:32 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
SQL Server | Useful stuff
Sunday, December 23, 2007 7:04:27 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
Helped with work | SQL Server
Sunday, December 23, 2007 7:03:26 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
BI | SQL Server | Useful stuff
http://www.devarticles.com/c/a/SQL-Server/Using-Triggers-In-MS-SQL-Server/2/

CREATE TRIGGER trig_updateAuthor
ON authors
FOR UPDATE 

AS

DECLARE @oldName VARCHAR(100)
DECLARE @newName VARCHAR(100)

IF NOT UPDATE(au_fName) AND NOT UPDATE(au_lName)
BEGIN
   RETURN 
END

SELECT @oldName = (SELECT au_fName + ' ' + au_lName FROM Deleted)
SELECT @newName = (SELECT au_fName + ' ' + au_lName FROM Inserted)

PRINT 'Name changed from "' + @oldName + '" to "' + @newName + '"'

Sunday, December 23, 2007 6:09:07 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
Helped with work | SQL Server | T-SQL
Sunday, December 23, 2007 6:04:59 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | SQL Server
Sunday, December 23, 2007 5:55:49 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
SQL Server | Database design
Sunday, December 23, 2007 5:18:02 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
SQL Server | BI
WITH cteStatusCounts(FormsCount, SubjectID,StatusCodeID)
AS (     SELECT COUNT(FormID) AS FormsCount, SubjectID,StatusCodeID
    FROM tblFeedbackForms
    Where SubjectAreaID=2
    GROUP BY SubjectID,StatusCodeID
)

SELECT     FormsPivot.SubjectID as KeyID,
    stTotalIncoming=ISNULL([1]+[2]+[3]+[4],0),
    stOpen=ISNULL([1], 0),
    stMoreInfo=ISNULL([2], 0),
    stWithdrawn=ISNULL([3], 0),
    stCoached=ISNULL([4], 0)
FROM     cteStatusCounts PIVOT(sum(FormsCount) FOR StatusCodeID in([1],[2],[3],[4])) as FormsPivot
Order by FormsPivot.SubjectID

Sunday, December 23, 2007 5:14:29 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
2005 | SQL Server | T-SQL
 Wednesday, December 05, 2007
Wednesday, December 05, 2007 10:38:08 PM (Central America Standard Time, UTC-06:00)  #    Comments [0] -
Helped with work | SQL Server
Archive
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Vlad Navazhylau
Sign In
Statistics
Total Posts: 173
This Year: 96
This Month: 0
This Week: 0
Comments: 1
All Content © 2008, Vlad Navazhylau