Welcome to weblogs.com.pk Sign in | Join | Help

Sql.Net

Check out Sql.Net, it’s an open source, object based API for creating dynamic queries for SQL, Oracle and mySQL. I will consider it to incorporate into our home grown O/R mapper at our workplace which is no longer actively used anymore (CodeSmith rocks); but it was quite a fun coding for it J

 

The good thing which attracted me to Sql.Net is a feature called; Cross-Tabs (Pivot Tables) which is very handy for developers who are involved in report writing.

 

I am copy/pasting an example from its User Guide below for a quick peek.

In order to explain how to create a Cross-Tab we will walk through an example of transforming the following data:

select * from orders
 

orderId

productId

customerId

Date

quataty

1

1

1

2004-12-30

12

2

1

2

2004-12-31

2

3

2

2

2005-12-15

80

4

2

1

2003-01-01

27

5

1

1

2003-01-02

8

into the following Cross-Tab

customerId

IsTotal

before2004

y2004

after2004

product1

product2

1

0

35

12

NULL

20

27

2

0

NULL

2

80

2

80

NULL

1

35

14

80

22

107

 

Published Monday, April 25, 2005 3:07 AM by khurram
Filed under: ,

Comments

No Comments

New Comments to this post are disabled