#TSQL, 129 bytes
TSQL, 129 bytes
USE MASTER in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)FROM spt_values WHERE number<26and'P'=type
Ungolfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)
FROM spt_values
WHERE number<26and'P'=type
#TSQL, 129 bytes
USE MASTER in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)FROM spt_values WHERE number<26and'P'=type
Ungolfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)
FROM spt_values
WHERE number<26and'P'=type
TSQL, 129 bytes
USE MASTER in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)FROM spt_values WHERE number<26and'P'=type
Ungolfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)
FROM spt_values
WHERE number<26and'P'=type
#TSQL, 177129 bytes
This has been done without looping. The
USE MASTER
USE MASTER in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER;MASTER
WITH n(n)as(SELECT number FROM spt_values WHERE'P'=type)SELECT(SELECT char(65+SUBSTRING(n+x.n*x.n)%26)FROM n WHERE n<=x.n*2FOR xml pathREPLICATE('')'ABCDEFGHIJKLMNOPQRSTUVWXYZ',type26).value('.','char(51)'number*number+1,number*2+1)FROM n xspt_values WHERE n<26number<26and'P'=type
Ungolfed:
USE MASTER;
WITH n(n)as
(
SELECT number
FROM spt_values
WHERE'P'=type
)
SELECTMASTER
(
SELECT char(65+SUBSTRING(n+x.n*x.n)%26)
FROM n
WHERE n<=x.n*2
FOR xml pathREPLICATE('')'ABCDEFGHIJKLMNOPQRSTUVWXYZ',type26).value('.','char(51)'number*number+1,number*2+1)
FROM n xspt_values
WHERE n<26number<26and'P'=type
#TSQL, 177 bytes
This has been done without looping. The
USE MASTER
in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER;
WITH n(n)as(SELECT number FROM spt_values WHERE'P'=type)SELECT(SELECT char(65+(n+x.n*x.n)%26)FROM n WHERE n<=x.n*2FOR xml path(''),type).value('.','char(51)')FROM n x WHERE n<26
Ungolfed:
USE MASTER;
WITH n(n)as
(
SELECT number
FROM spt_values
WHERE'P'=type
)
SELECT
(
SELECT char(65+(n+x.n*x.n)%26)
FROM n
WHERE n<=x.n*2
FOR xml path(''),type).value('.','char(51)')
FROM n x
WHERE n<26
#TSQL, 129 bytes
USE MASTER in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)FROM spt_values WHERE number<26and'P'=type
Ungolfed:
USE MASTER
SELECT SUBSTRING(REPLICATE('ABCDEFGHIJKLMNOPQRSTUVWXYZ',26),number*number+1,number*2+1)
FROM spt_values
WHERE number<26and'P'=type
#TSQL, 177 bytes
This has been done without looping. The
USE MASTER
in the beginning of the script is to ensure that the query is run in the master database which is default for many users(not counting bytes for that).
Golfed:
USE MASTER;
WITH n(n)as(SELECT number FROM spt_values WHERE'P'=type)SELECT(SELECT char(65+(n+x.n*x.n)%26)FROM n WHERE n<=x.n*2FOR xml path(''),type).value('.','char(51)')FROM n x WHERE n<26
Ungolfed:
USE MASTER;
WITH n(n)as
(
SELECT number
FROM spt_values
WHERE'P'=type
)
SELECT
(
SELECT char(65+(n+x.n*x.n)%26)
FROM n
WHERE n<=x.n*2
FOR xml path(''),type).value('.','char(51)')
FROM n x
WHERE n<26