December 24, 2015 at 8:06 pm
Comments posted to this topic are about the item Merry Christmas 2015
December 25, 2015 at 2:55 am
Merry Christmas Steve
December 25, 2015 at 5:17 am
Marry Christmas and thanks for your work on the SSC.com, Steve.:-)
Jiri Vobr, Czech Republic.
December 25, 2015 at 7:50 am
Try this one:
SELECT geometry::Parse('POLYGON((
4 0, 0 0, 3 2, 1 2, 3 4, 1 4, 3 6, 2 6,
4 8, 6 6, 5 6, 7 4, 5 4, 7 2, 5 2, 8 0, 4 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
2.5 0, 3 -1, 5 -1, 5.5 0, 2.5 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
4 7.5, 3.5 7.25, 3.6 7.9, 3.1 8.2, 3.8 8.2,
4 8.9, 4.2 8.2, 4.9 8.2, 4.4 7.9, 4.5 7.25, 4 7.5
))')
UNION ALL
SELECT geometry::Point(
RAND(CHECKSUM(NEWID())) * 5 +1.5,
RAND(CHECKSUM(NEWID())) * 6, 0
).STBuffer(0.3)
FROM master.dbo.spt_values
WHERE type = 'P' AND number BETWEEN 1 AND 20;
December 25, 2015 at 1:32 pm
arnierowland (12/25/2015)
Try this one:SELECT geometry::Parse('POLYGON((
4 0, 0 0, 3 2, 1 2, 3 4, 1 4, 3 6, 2 6,
4 8, 6 6, 5 6, 7 4, 5 4, 7 2, 5 2, 8 0, 4 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
2.5 0, 3 -1, 5 -1, 5.5 0, 2.5 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
4 7.5, 3.5 7.25, 3.6 7.9, 3.1 8.2, 3.8 8.2,
4 8.9, 4.2 8.2, 4.9 8.2, 4.4 7.9, 4.5 7.25, 4 7.5
))')
UNION ALL
SELECT geometry::Point(
RAND(CHECKSUM(NEWID())) * 5 +1.5,
RAND(CHECKSUM(NEWID())) * 6, 0
).STBuffer(0.3)
FROM master.dbo.spt_values
WHERE type = 'P' AND number BETWEEN 1 AND 20;
Nice, trying to explain it to my 6 years old:-D
December 26, 2015 at 10:25 am
Merry Christmas for you , Steeve and for every posters on this discussion.
Knowing Steve's humor , I have only 2 possibilities ; the Christmas tree and the reindeer, the 1st one seemed me the most probable one. So thanks for these points.
Sorry to be so late but I was busy with the visit of our elder son , everybody was here for our 1st Christmas in Britany ...
December 26, 2015 at 10:30 am
Arnie , happy Christmas for this beautiful Christmas tree.
A solution more complicated than the Steve' one but to see it is a pleasure , I have to have a look at the geometry topic I have not used since 5 years.
I have not seen you on the forums , but it is true that we are not often on the same ones.
December 27, 2015 at 7:59 am
Ahhhh. How cute is that...
December 27, 2015 at 7:59 am
arnierowland (12/25/2015)
Try this one:SELECT geometry::Parse('POLYGON((
4 0, 0 0, 3 2, 1 2, 3 4, 1 4, 3 6, 2 6,
4 8, 6 6, 5 6, 7 4, 5 4, 7 2, 5 2, 8 0, 4 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
2.5 0, 3 -1, 5 -1, 5.5 0, 2.5 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
4 7.5, 3.5 7.25, 3.6 7.9, 3.1 8.2, 3.8 8.2,
4 8.9, 4.2 8.2, 4.9 8.2, 4.4 7.9, 4.5 7.25, 4 7.5
))')
UNION ALL
SELECT geometry::Point(
RAND(CHECKSUM(NEWID())) * 5 +1.5,
RAND(CHECKSUM(NEWID())) * 6, 0
).STBuffer(0.3)
FROM master.dbo.spt_values
WHERE type = 'P' AND number BETWEEN 1 AND 20;
Not sure what this was supposed to be. It didn't seem to work on my 2008 R2.
December 27, 2015 at 8:47 am
Works in 2008R2 -BUT you have to view the 'Spatial Results' tab.
December 27, 2015 at 8:56 am
Iwas Bornready (12/27/2015)
Ahhhh. How cute is that...
It's working on SQL Server2014 Express and I have looked at the Spatial Results panel ( between the Results and Messages panels )
December 28, 2015 at 1:29 am
The "order by" clause misses!
Try this:
declare @image as table (
row_id tinyint
primary key clustered (row_id desc)
);
insert into @image(row_id)
values(1),(2),(3),(4),(5),(6),(7),(8),(9)
select
case
when max(i.row_id) over() - i.row_id > 1 then replicate(' ', max(i.row_id) over() - 2 - i.row_id) + replicate('*',i.row_id) + replicate('*',i.row_id-1)
else replicate(' ', max(i.row_id) over() - 3) + '|'
end img
from @image i
December 28, 2015 at 6:37 am
I hope everyone had a very Merry Christmas and enjoyed time with family.
December 28, 2015 at 8:52 am
arnierowland (12/25/2015)
Try this one:SELECT geometry::Parse('POLYGON((
4 0, 0 0, 3 2, 1 2, 3 4, 1 4, 3 6, 2 6,
4 8, 6 6, 5 6, 7 4, 5 4, 7 2, 5 2, 8 0, 4 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
2.5 0, 3 -1, 5 -1, 5.5 0, 2.5 0
))')
UNION ALL
SELECT geometry::Parse('POLYGON((
4 7.5, 3.5 7.25, 3.6 7.9, 3.1 8.2, 3.8 8.2,
4 8.9, 4.2 8.2, 4.9 8.2, 4.4 7.9, 4.5 7.25, 4 7.5
))')
UNION ALL
SELECT geometry::Point(
RAND(CHECKSUM(NEWID())) * 5 +1.5,
RAND(CHECKSUM(NEWID())) * 6, 0
).STBuffer(0.3)
FROM master.dbo.spt_values
WHERE type = 'P' AND number BETWEEN 1 AND 20;
Extremely cool!
December 30, 2015 at 5:34 am
Carlo Romagnano (12/28/2015)
The "order by" clause misses!Try this:
declare @image as table (
row_id tinyint
primary key clustered (row_id desc)
);
insert into @image(row_id)
values(1),(2),(3),(4),(5),(6),(7),(8),(9)
select
case
when max(i.row_id) over() - i.row_id > 1 then replicate(' ', max(i.row_id) over() - 2 - i.row_id) + replicate('*',i.row_id) + replicate('*',i.row_id-1)
else replicate(' ', max(i.row_id) over() - 3) + '|'
end img
from @image i
An upside down ISS Christmas tree - nice!
Viewing 15 posts - 1 through 15 (of 18 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy