How to install SQL Server Management Studio 2008 component only [closed]

I found some articles to be of major use: This link is an experience someone else had: http://goneale.com/2009/05/24/cant-install-microsoft-sql-server-2008-management-studio-express/ This link has the exact steps involved to install everything properly: http://www.codefrenzy.net/2011/06/03/how-to-install-sql-server-2008-management-studio/ This link confirms the previous link: https://superuser.com/questions/88244/installing-sql-server-management-studio-when-vs2010-beta-2-is-already-installed My Instructions I am not sure if my instructions will be 100% accurate, but in my instance, because … Read more

How to create a function in SQL Server

How about this? CREATE FUNCTION dbo.StripWWWandCom (@input VARCHAR(250)) RETURNS VARCHAR(250) AS BEGIN DECLARE @Work VARCHAR(250) SET @Work = @Input SET @Work = REPLACE(@Work, ‘www.’, ”) SET @Work = REPLACE(@Work, ‘.com’, ”) RETURN @work END and then use: SELECT ID, dbo.StripWWWandCom (WebsiteName) FROM dbo.YourTable ….. Of course, this is severely limited in that it will only … Read more

How to declare an array inside MS SQL Server Stored Procedure?

You could declare a table variable (Declaring a variable of type table): declare @MonthsSale table(monthnr int) insert into @MonthsSale (monthnr) values (1) insert into @MonthsSale (monthnr) values (2) …. You can add extra columns as you like: declare @MonthsSale table(monthnr int, totalsales tinyint) You can update the table variable like any other table: update m … Read more

Why use the SQL Server 2008 geography data type?

If you plan on doing any spatial computation, EF 5.0 allows LINQ Expressions like: private Facility GetNearestFacilityToJobsite(DbGeography jobsite) { var q1 = from f in context.Facilities let distance = f.Geocode.Distance(jobsite) where distance < 500 * 1609.344 orderby distance select f; return q1.FirstOrDefault(); } Then there is a very good reason to use Geography. Explanation of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)