Yet another SQL Server enthusiast


SQL Server charts – A simple solution

Filed under: Uncategorized — sa @ 4:31 PM

A really simple and quick solution to create charts with SQL Server is to REPLICATE following two Unicode chars: 9733 ★ and 9734 ☆.


SELECT *, REPLICATE(NCHAR(9733), Sales) + REPLICATE(NCHAR(9734), MAX(Sales) OVER() - Sales) AS Chart
 ('Alfa Romeo', 4),
 ('Audi', 2),
 ('BMW', 1),
 ('Citroen', 4),
 ('Dacia', 10)
) AS t(Car, Sales)




Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: