Monday, 25 August 2008

UDF for Splitting a varchar in SQL Server

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

CREATE FUNCTION [dbo].[Split]
(
@RowData nvarchar(2000),
@SplitOn nvarchar(5)
)
RETURNS @RtnValue table
(
Id int identity(1,1),
Data nvarchar(100)
)
AS
BEGIN
Declare @Cnt int
Set @Cnt = 1
While (Charindex(@SplitOn,@RowData)>0)
Begin
Insert Into @RtnValue (data)
Select
Data = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1)))
Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData))
Set @Cnt = @Cnt + 1
End
Insert Into @RtnValue (data)
Select Data = ltrim(rtrim(@RowData))
Return
END

Tuesday, 19 August 2008

Sending email through SSIS (Script task)

Sending email through VB.NET (Could be used in SSIS script task)

Dim mailMsg As System.Web.Mail.MailMessage
mailMsg = New System.Web.Mail.MailMessage()
mailMsg.From = "srihari@kothapalli.com"
mailMsg.To = "srihari.kothapalli@gmail.com"
mailMsg.Cc = ""
mailMsg.Bcc = ""
mailMsg.Subject = "This is subject at " + DateTime.Now.ToString()
mailMsg.BodyFormat = System.Web.Mail.MailFormat.Html
mailMsg.Body = "This is the body"
mailMsg.Priority = System.Web.Mail.MailPriority.High
System.Web.Mail.SmtpMail.SmtpServer = "smtp.kothapalli.com"
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "kot\srihari")
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "srihar1pa33w0rd")
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25")
mailMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "false")
System.Web.Mail.SmtpMail.Send(mailMsg)

Hope it helped.

Monday, 18 August 2008

Mingle tool by ThoughtWorks

Agile Project Management Tool

I was long wondering, how does the project management get automated in Agile practices with all the planning games being driven by a program instead of paper cards!!! Until I have seen one of my friends blogs – I did not realize that ThoghtWorks actually has a open source project management tool named “Mingle” to help this scenario.

Find his blog entry here and download the Mingle here. Download has taken me around 30 seconds. It is really a quick download and installation has taken me around 1 minute. So, its quite good with the features its promising to deliver.

It says it can not work with anything other than MySQL or PostGreSQL. It is a problem for me given that it is only SQL Server or Oracle that are the market leaders.

However, just to explore the tool.. lets go forward a bit more.

Downloaded the MySQL from here.

Followed the steps below.

1. Installed mySQL and used “create database mingle;” command in the command prompt of mySQL to create the database for setting up the Mingle on my localbox.
2. Ran through all the 6 steps in the http://localhost:8080/install/migrate as needed by Mingle.
3. Skipped the SMTP server details to fill in later

Not to forget, we have lot of help in understanding Mingle at http://studios.thoughtworks.com/mingle

When I started using this, as a website it looked quite good. Great thing about this is to be able to select the pre-defined template as below.

• Agile hybrid template(2.0.1)
This template represents a hybrid Agile approach to project tracking that would support release and iteration-based planning. The template includes some sample cards to illustrate the working of the charts and transitions. These stories can be deleted if necessary by a Project Administrator.
• Scrum template(2.0.1)
• Xp template(2.0.1)
This template can be used to create an Extreme Programming (XP) project for a small team that needs basic card tracking capability and reporting. The template contains some sample stories to illustrate how one might use charts and transitions. These stories can be deleted by a Project Administrator.
However, my research had to end here inspite of seeing all the really good tabs that says “sprint backlog” etc… Because most of the tabs keep giving me the error that says “error etc etc”.
I will give another try on my home box and let you know if I get any success.
But the summary is that today or tomorrow, it is going to get stabilized. It is a great news for Industry which is already behind agile approaches of software development.

Saturday, 16 August 2008