SUBSTRING can be used to return a part of character string.
The syntex for SUBSTRING will look like this:
SUBSTRING ( value ,start , length )
where Value is the column name or the expression.
Start is an interger or bigint that specifies where the returned characters start.
Length is an integer or bigint that specifies how many character of the Value will be returned.
For example if we want to reurn the first 2 characters from the [f_name] column from table [students] then the query should be like that:
use [northwind]
Go
select substring(f_name,2,2) from students
Go
Wednesday, November 25, 2009
Monday, November 23, 2009
Visual Studio 2008 cannot connect to SQL 2008
When trying to connect to SQL server 2008 from visual studio 2008 you will get the following error:
"This server version is not supported. Only servers up to Microsoft SQL Server 2005 are supported".
Solution:
just download and install Visual Studio 2008 Service Pack 1 and it will work fine.
Visual Studio SP1 can be downloaded from Microsoft website, it is about 800 MB in iso format.
Here is the Download page for Visual Studio 2008 SP1
"This server version is not supported. Only servers up to Microsoft SQL Server 2005 are supported".
Solution:
just download and install Visual Studio 2008 Service Pack 1 and it will work fine.
Visual Studio SP1 can be downloaded from Microsoft website, it is about 800 MB in iso format.
Here is the Download page for Visual Studio 2008 SP1
Subscribe to:
Posts (Atom)