Feeds:
Posts
Comments

Archive for April 16th, 2008

PIVOT And UNPIVOT

If you have ever worked with Microsoft Access, you might have used the TRANSFORM statement to create a crosstab query.
Even though the similar functionality was missed in sql server 2000, we can achieve the same in SQL Server 2005 via the PIVOT operator with the SELECT statement.
The PIVOT operator can be used to [...]

Read Full Post »

1). With Help Of master.sys.xp_dirtree Function We get the directory structure of windows System.
This Function Accept One Parameter.
In This Pareamter give the Location.

below give code for getting structure of windows file system.
 
EXEC master.sys.xp_dirtree ‘c:\Inetpub’

Read Full Post »

There is a syntax of getting database name & status from sql server.
SELECT DB_NAME() AS DatabaseName, DATABASEPROPERTYEX(‘master’, ’Status’) AS DBStatus

Read Full Post »