Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting 14 random records
Message
 
 
To
18/02/2009 02:04:25
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01382524
Message ID:
01382576
Views:
38
>>BTW, how can we search for a specific thread ID ?
>
>Just enter the thread ID in the Message ID. A thread ID is the first message ID of the thread.

Thanks. BTW, I'm not sure how to read the results
set statistics TIME ON
/****** Script for SelectTopNRows command from SSMS  ******/
Select * from [AdventureWorks].[Production].[TransactionHistory] WHERE TransactionID = 
(Select Top 1 [TransactionID] from [AdventureWorks].[Production].[TransactionHistory]
Order By NewID() )

SELECT TOP 1 [TransactionID]
      ,[ProductID]
      ,[ReferenceOrderID]
      ,[ReferenceOrderLineID]
      ,[TransactionDate]
      ,[TransactionType]
      ,[Quantity]
      ,[ActualCost]
      ,[ModifiedDate]
  FROM [AdventureWorks].[Production].[TransactionHistory] order by NEWID()
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform