#T-SQL, 216 bytes
T-SQL, 216 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text. The height cannot be adjusted to exceed the number of elements in the input.
Because of the horrible implementation of STRING_AGG, the height variable will only work in MSSM. MS should have made a third optional parameter to include the order of the elements being concatenated.
The online version can only support adjustment of the width. Height will result in a funky result with multiple stacking shapes.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
-- @ = width
-- @h = height
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i,j
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n)
,@,(SELECT top(abs(@h))i j FROM @)g GROUP BY i,j)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
#T-SQL, 216 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text. The height cannot be adjusted to exceed the number of elements in the input.
Because of the horrible implementation of STRING_AGG, the height variable will only work in MSSM. MS should have made a third optional parameter to include the order of the elements being concatenated.
The online version can only support adjustment of the width. Height will result in a funky result with multiple stacking shapes.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
-- @ = width
-- @h = height
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i,j
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n)
,@,(SELECT top(abs(@h))i j FROM @)g GROUP BY i,j)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
T-SQL, 216 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text. The height cannot be adjusted to exceed the number of elements in the input.
Because of the horrible implementation of STRING_AGG, the height variable will only work in MSSM. MS should have made a third optional parameter to include the order of the elements being concatenated.
The online version can only support adjustment of the width. Height will result in a funky result with multiple stacking shapes.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
-- @ = width
-- @h = height
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i,j
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n)
,@,(SELECT top(abs(@h))i j FROM @)g GROUP BY i,j)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
#T-SQL, 217216 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text. The height cannot be adjusted to exceed the number of elements in the input.
Because of the horrible implementation of STRING_AGG , the height variable will only work in MSSM. MS should have made a third optional parameter to include the order of the elements being concatenated.
The online version can only support adjustment of the width. Height will result in a funky result with multiple stacking shapes.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
-- @ = width
-- @h = height
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i,j
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECTtop(abs(@h))*FROMi spt_valuesj FROM @)gGROUP BY i,j)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
#T-SQL, 217 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECTtop(abs(@h))*FROM spt_values)gGROUP BY i)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
#T-SQL, 216 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text. The height cannot be adjusted to exceed the number of elements in the input.
Because of the horrible implementation of STRING_AGG , the height variable will only work in MSSM. MS should have made a third optional parameter to include the order of the elements being concatenated.
The online version can only support adjustment of the width. Height will result in a funky result with multiple stacking shapes.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
-- @ = width
-- @h = height
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i,j
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECTtop(abs(@h))i j FROM @)gGROUP BY i,j)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
#T-SQL, 217 bytes
I was unable to make a [try it online] option. Before executing this MS-SQL Studio Management, press CRTL-t to show data as text.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECT
top(abs(@h))*FROM spt_values)g
GROUP BY i)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online
#T-SQL, 217 bytes
I was unable to make a [try it online] option. Before executing this MS-SQL Studio Management, press CRTL-t to show data as text.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECT
top(abs(@h))*FROM spt_values)g
GROUP BY i)f
ORDER BY i*@h
#T-SQL, 217 bytes
Before executing this MS-SQL Studio Management, press CRTL-t to show data as text.
USE master
DECLARE @ table(v int,i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)
DECLARE @s INT=1,@h INT=1
SELECT iif(@s>0,reverse(x),x)FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECT
top(abs(@h))*FROM spt_values)g
GROUP BY i)f
ORDER BY i*@h
This script will not show the correct shapes in the online version, so I made some minor adjustments to compensate. Try it online