This is a fun one! Grab the code and drop it into SSMS. It's a fun random poem with my thoughts on leaves. It's
CREATE TABLE #poem
(ID int, WORDS VARCHAR(20))
GO
INSERT INTO #poem
(ID, WORDS)
VALUES
(1, 'Chase'),
(2, 'Fall'),
(3, 'Crumple'),
(4, 'Blow'),
(5, 'Pile'),
(6, 'Whirl'),
(7, 'Dance'),
(8, 'Drift'),
(9, 'Scatter'),
(10, 'Play'),
(11, 'Burn'),
(12, 'Roll')
GO
DECLARE @Random INT;
DECLARE @Random2 INT;
DECLARE @Random3 INT;
DECLARE @Upper INT;
DECLARE @Lower INT
SET @Lower = 1
SET @Upper = 12
SELECT @Random = ROUND(((@Upper - @Lower -1) * RAND() + @Lower), 0)
SELECT @Random2 = ROUND(((@Upper - @Lower -1) * RAND() + @Lower), 0)
SELECT @Random3 = ROUND(((@Upper - @Lower -1) * RAND() + @Lower), 0)
SELECT
WORDS AS LeafActions
FROM #poem
WHERE ID = @Random
UNION
SELECT
WORDS
FROM #poem
WHERE ID = @Random2
UNION
SELECT
WORDS
FROM #poem
WHERE ID = @Random3
DROP TABLE #poem
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.