I suggest that you add the calculated column to your result set when choosing which is obtained as a random number, and then select the top 50, sorted by this column. This will give you a random sample.
For instance:
SELECT TOP 50 *, RAND(Id) AS Random FROM SourceData ORDER BY Random
where SourceData is your source data table or view. This assumes, by the way, T-SQL on SQL Server 2008. It also assumes that you have an identifier column with unique identifiers in your data source. If your identifiers are very low, itβs useful to multiply them by a large integer before passing them to RAND, for example:
RAND(Id * 10000000)
source share