Related Tags
Category List
Recently Viewed...
DNN Modules
   
Recent Comments

"Hi, As a DNN Vendor, I'm very pleased with the modules Datasprings is offering. Another thing I'm very pleased with is the excellent technical support Datasprings delivers to it's customers. On my whishlist are two things: seeing the slow loading time of the Dynamic Forms module in IE8 solved, and second, seeing the birth of a Dynamic Reporting module. One thing I love about the Datasprings modules is the interconnectivity between the modules. But one thing that is a bit pitifull is that for reporting purposes, you have to resort to third party modules like Indoogrid. Therefore, having the ability to be able to use the Dynamic Registration and Dynamic Forms module for input and having a Dynamic Reporting module for reporting and data presentations purposes would be a killer combination! I hope Datasprings takes this in consideration. Greetings, Anthony www.webmove.be" Read more
by Anthony Candaele on Another great idea... Data Springs Community Blog

"I am learning ASP.net & hope to master it soon. Articles like this make me more confident. Thanks." Read more
by Air Horn on ASP.NET / DotNetNuke Localization – How to Spell Check your applications resource files.

"Thanks David! Yes, we wanted to shared this as we recently implemented this for the latest Dynamic User Directory and it increased performance by probably 300+%! " Read more
by Chad Nash on SQL 2005 PIVOT COMMAND TUTORIAL

    |   Register   |   Saturday, March 13, 2010   
You are here:News  Blog  


In the Flow
Data Springs, Inc. - An online diary and web log from staff and customers for premium DotNetNuke resources, Data Springs Modules, and Data Springs Services.
Posted by: Candace on 1/25/2010 | 0 Comments
Integrating your Dynamic Forms or Dynamic Registration with PayPal is not hard but it does have some areas that often cause errors with Completion Events. Check out the top 5 trouble spots.
Posted by: Chip Levinson on 1/12/2010 | 0 Comments
How DataSprings Helped TechWise Research Implement its New Website
Posted by: Chad Nash on 12/15/2009 | 1 Comment
The RESX spell checking tool is currently a free service that you can take advantage of to upload your resource files or web project. You can install a zip file of RESX files, or include full applications such as ASP.NET Applications or DNN Modules. The service will filter your file(s) for resource and localization files and check each property within the XML file for spelling issues.
Posted by: David To on 12/10/2009 | 1 Comment

 A Quick Tutorial on SQL 2005 PIVOT T-SQL COMMAND

A PIVOT command in SQL will transpose a particular column into row.  For example, let’s study the following SQL command to obtain (userid, username, firstname, lastname, email, displayname, propertyvalue, propertyname, portalID) from a DotNetNuke database.

select U.userid,U.username,U.firstname,U.lastname,U.email,U.Displayname,UP.propertyvalue,

P.propertyname, P.PortalID into ##tempDUDProfile

from Users U inner join userprofile UP on U.userid = UP.userid

inner join profilepropertydefinition P on UP.propertydefinitionid = P.propertydefinitionid

where P.Visible=1

AND P.Deleted=0

AND P.PRopertyName <> 'FirstName'

AND P.PropertyName <> 'LastName'

AND P.PRopertyNAme <> 'E-Mail'

AND P.PRopertyNAme <> 'Email'

AND P.PRopertyNAme <> 'Username'

AND P.PRopertyNAme <> 'DisplayName'

AND P.PropertyName Not Like '%[.#)(&[@!^!]]%' ESCAPE '!'

Note that I would like to transpose each unique entry in the column “propertyname” into their own distinct column name (TimeZone, PreferredLocale, etc.)

This is where the PIVOT command comes in handy.

DECLARE @columns VARCHAR(8000)

SELECT @columns = COALESCE(@columns + ',[' + cast(propertyname as varchar) + ']',

      '[' + cast(propertyname as varchar)+ ']')            

      FROM    ##tempDUDProfile

      GROUP BY propertyname

      DECLARE @query VARCHAR(8000)

      SET @query = '

      SELECT *

      FROM ##tempDUDProfile

      PIVOT

      (

            MAX(propertyvalue)

            FOR [propertyname]

            IN (' + @columns + ')

      )

             AS p

       '                     

      EXECUTE(@query)

 

NOTE:  The COALESCE command will return only profile property that has values. So if all the users do not have a profile set, the default would be NULL and it would not generate a column for this property.

 

 

 

 

Posted by: Candace on 12/8/2009 | 0 Comments
As 2009 draws to a close, we, at Data Springs, look back at our great experience at the OpenForce Conference with great satisfaction and anticipation.
1 2  Go to Page:  


     
    Featured Posts
    Archive
    Bloggers
    Recent Posts
     

    Copyright 2005 - 2010 by Data Springs, Inc.
    Contact Us | Terms Of Use | Privacy Statement