Suresh Behera

The Microsoft .Net Junkies

News

Blogroll

Reading

V-Days Vs SQL

Open query analyzer and press Ctrl + T and run this below code.
See what the magic will be happen.Thanks  Narayan.
With regards,
-Suresh ,Microsoft MVP .Net
-----------------------------------------------------
/*
Author: Steve Kass, Drew University
Hosted by: http://vyaskn.tripod.com
Script works on SQL Server 7.0 and 2000
*/
USE tempdb
GO
SET NOCOUNT ON
CREATE TABLE [seqA1740E61-1E21-11D6-B831-E02C0D466A26] (nbr int IDENTITY)
DECLARE @i int
SET @i = 0
WHILE @i < 25
BEGIN
	INSERT INTO [seqA1740E61-1E21-11D6-B831-E02C0D466A26] DEFAULT VALUES
	SET @i = @i + 1
END
DECLARE @heart binary(264)
SET @heart =
  0x010b0e12220b0108100e25
+ 0x080105120a280501031406
+ 0x2a03010215042b02010116
+ 0x022c010100160201000100
+ 0x1602010001000100010001
+ 0x0001000100010101002c01
+ 0x010201002b020104010029
+ 0x0401060100270601080100
+ 0x2508010a0100230a010c01
+ 0x00210c010e01001f0e0110
+ 0x01001d10011201001b1201
+ 0x1401001914011601001716

SELECT
  STUFF(STUFF(STUFF(
      R,A/256,A%256,SPACE(A%256)),
        B/256,B%256,SPACE(B%256)),
        C/256,C%256,SPACE(C%256))
AS N'I love you/Eu te amo/Ti amo/Je t''aime/Ya vas lyublyu/Ich liebe Dich!!!'
FROM (
  SELECT Nbr AS L, SUBSTRING(S,Nbr,2*L) AS R FROM (
    SELECT
      LEN(S+'*') AS L,
      REPLICATE(S+'*',4) AS S
    FROM (
      SELECT 'Happy-Valentine''s-Day' AS S
    ) X
  ) V CROSS JOIN [seqA1740E61-1E21-11D6-B831-E02C0D466A26]
  WHERE Nbr BETWEEN 1 AND L
) W JOIN (
  SELECT
    Nbr,
    CONVERT(int,SUBSTRING(@heart,6*Nbr-5,2)) AS A,
    CONVERT(int,SUBSTRING(@heart,6*Nbr-3,2)) AS B,
    CONVERT(int,SUBSTRING(@heart,6*Nbr-1,2)) AS C
  FROM [seqA1740E61-1E21-11D6-B831-E02C0D466A26]
  WHERE Nbr BETWEEN 1 AND 24
) X
ON L = Nbr
GO
DROP TABLE [seqA1740E61-1E21-11D6-B831-E02C0D466A26]

Comments

Olle de Zwart said:

After you have run this, open up as many weird atachements in your inbox as you can!
# March 9, 2004 4:09 PM

Mauricio Feijo said:

Oh, don't forget to turn your anti-virus off for better enjoyment !!!
# March 9, 2004 6:35 PM

Teucer said:

Suresh, I am damn curious and I dont have sql on my box. Can you tell what it does ... I am not a sql pro hence cant understand a lot ... :(

# March 9, 2004 8:13 PM

TrackBack said:

You've been Taken Out! Thanks for the good post.
# March 10, 2004 1:43 AM

Work for stay at home moms. said:

Work at home moms. Top work at home moms. Wahm com the online magazine for work at home moms. Moms work from home. Work for stay at home moms. Work at home moms resource wahmpros.

# September 2, 2008 7:15 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)