August 2007 - Posts

I usually create a few files, let's say 5 GB each, on my hard drive. Whenever I run out of disk space, I can just drop a couple of those and keep working - that buys me some time. If I am in a hurry, dropping a placeholder file is a quick fix.

Of course, at some later time I need to clean up my hard drive, and re-create dropped placeholder files.


create view wrapped_rand_view
as
select rand( ) as random_value
go
create function wrapped_rand()
returns float
as
begin
declare @f float
set @f = (select random_value from wrapped_rand_view)
return @f
end

select --your columns--, dbo.wrapped_rand() wrapped_rand
from YourTable