|
Posted by Erland Sommarskog on 10/11/05 11:31
Steve Jorgensen (nospam@nospam.nospam) writes:
> On 7 Nov 2005 08:25:46 -0800, "Stylus Studio" <stylusstudio@gmail.com>
> wrote:
>
>>Stylus Studio is very excited about the World Wide Web consortium's
>>candidate recommendation of XSLT 2.0 and XML XQuery 1.0 as standards
>>for transforming and querying XML
>>(http://www.internetnews.com/ent-news/article.php/3561396). We are
>>celebrating by giving away free XQuery bumper stickers (while supplies
>>last) .You can get them here: http://www.stylusstudio.com/contest.html.
>>Thanks,
>>
>
> And that has enough interest to SQL Server users for you to Spam this
> newsgroup?
Yes, as long as we accept other announcements, this is definitely on topic.
Here is a piece of sample code that I wrote earlier tonight for receiving
query notifications in SQL 2005:
DECLARE @xml TABLE (x xml NOT NULL);
RECEIVE convert(xml, message_body) FROM myQueue INTO @xml;
WITH XMLNAMESPACES
('http://schemas.microsoft.com/SQL/Notifications/QueryNotification' AS qn)
SELECT Message = c.value(N'(qn:Message)[1]', 'nvarchar(MAX)'),
Source = c.value(N'@source', 'nvarchar(255)'),
Info = c.value(N'@info', 'nvarchar(255)'),
Type = c.value(N'@type', 'nvarchar(255)')
FROM @xml x
CROSS APPLY x.x.nodes(N'/qn:QueryNotification') AS T(c)
This is jam-packed with new features in SQL Server 2005. And those
..value() and .nodes() are, yes,you guessed it, XQuery.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|