Intro

If you are a SharePoint Developer or Administrator you know it can take a long time to deploy SharePoint 2010 and difficult to remember everything that you have to configure in SharePoint 2010. A easy deployment solution is available to quickly deploy SharePoint 2010.

The Solution

The easy deployment solution is the CodePlex project namely AutoSPInstaller. This project use the power of PowerShell to automate deployment and configuration of SharePoint 2010. The PowerShell scripts allows you to deploy SharePoint 2010 with prerequisites, service packs and updates, Forefront Security, Language Packs, Office Web Apps and PDF iFilter with icon.

For a detailed guide to use the AutoSPInstaller scripts go to Tobias Lekman post: http://blog.lekman.com/2010/11/automated-sharepoint-2010-installations.html

These scripts allow you to configure SharePoint 2010 once according to your requirements and use it over and over again.

Developer Setup

What about a basic SharePoint 2010 setup for development? Well, Microsoft created a easy setup script to setup the following on a machine or VM:

  • SharePoint Server 2010 + Pre-requisites (Standalone)
  • Visual Studio 2010 Ultimate Edition
  • Silverlight 4 Tools for Visual Studio
  • Expression Studio 4 Ultimate
  • Open XML SDK
  • Visual Studio SDK
  • Visual Studio SharePoint Power Tools
  • Office 2010 Professional Plus
  • SharePoint Designer 2010
  • Visio 2010

The download location for SharePoint 2010 Easy Setup Script: http://www.microsoft.com/download/en/details.aspx?id=23415

Hope these scripts make your life easier as a SharePoint 2010 Developer and Administrator.

Cheerio!

Denali_thumb
Intro
Today I’m looking at the new TSQL function IIF that is available in SQL Server 2011 ”Denali”. IIF stand for “Inline IF”. IIF is a shorthand way for writing a CASE statement in TSQL.
MSDN Description
Returns one of two values, depending on whether the Boolean expression evaluates to true or false.
Syntax Format: IIF ( boolean_expression, true_value, false_value )
The first parameter is a Boolean expression e.g. Age > 21. The second parameter is return value if the expression is true and the third parameter is the return value if the expression is false.
TSQL Example
Basic example for IIF function:
DECLARE @age INT = 18;
SELECT IIF(@age > 21,'Allowed','Not allowed');

You can also have nested IIF. Nested IIF can only be nested up to a maximum level of 10. This is because the CASE statement has the same limitation.
DECLARE @age INT = 28,
        @firsttime BIT = 1;
SELECT IIF(@age > 21,
           IIF(@firsttime = 1, 'Free drink', 'No free drink'),
           'Not allowed');
 

Practical Example

My practical examples are using the AdventureWorks2008R2 database for Denali which is available here. Let look at a practical example for IIF function:
SELECT pdt.Name,
       IIF(SUM(piy.Quantity) < pdt.SafetyStockLevel, 'Low Stock', 'Normal Stock') AS 'Stock Status'
  FROM [AdventureWorks2008R2].[Production].[Product] pdt
  LEFT OUTER JOIN 
       [AdventureWorks2008R2].[Production].[ProductInventory] piy ON pdt.ProductID = piy.ProductID
 GROUP BY pdt.Name, pdt.SafetyStockLevel

As you can see the IIF function makes it allot easier to use than the CASE statement and helps to make your TSQL code smaller and more understandable. Let me know what you think about this function addition in SQL Server 2011 Denali or if you have any questions.

Cheerio!

Disqus