Post details: MS SQL matrix query

Feb 06, 2008 : MS SQL matrix query

If you use Microsoft SQL and you want to do a query to turn some rows into columns, it can be tricky. I don't know what that type of query is called, I think some call it a matrix query or a cross-tab query or a pivot query. Here's how I've been able to write a pivot cross-tab matrix queries for Microsoft SQL Server including an extra variation for SQL Server 2005.

Technorati tags:

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.
What is the 2-letter abbreviation for Michigan?
Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)

<  September 2014  >
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Categories


Archives

Misc

Syndicate this blog XML

powered by
b2evolution