devxlogo

April 11, 2007

Returning a Random set of Records

The NEWID() function returns a uniqueidentifier for each row of data that is returned. Execute the following query in the AdventureWorks database: select top 5 productid, name from production.productorder by

Declare the Coolest XQuery Variables

Here’s how to declare some important variables in XQuery: declare variable $v as document-node(element(*,xdt:untyped)) external;: Use this variable to pass an XML tree to a XQuery query. declare namespace nameSpace=”http://nameSpace.org”;

Emitting a Beep in Java

There are three ways to emit a beep in Java: Use an AU audio file: In Java, AU files need to be created at a sample rate of 8000. Higher