How software Engineers celebrate Valentines Day...!

by 3:55 AM 0 comments
Just follow this to see...!

Run the following script in sql server..and enjoy..!



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]

Ravi Tuvar

Developer

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

0 comments:

Post a Comment