SQL Server – Get Comma Separated Values from table

I had requirement to get the Comma Separated Values from the table for specific column. So here sharing with you example how i handle this situation. USE tempdb GO CREATE TABLE test1 ( column1 INT, column2 VARCHAR(6) ) INSERT INTO test1 VALUES (1,'Test1'), (1,'Test2'), (2,'Test3'), (2,'Test4'), (3,'Test5') Now see the

» Read more

Find the List of the SQL Servers running on a network

I had requirement to find list of all the SQL Server installed on local network then I found few very useful commands. Here sharing with you all. You can use sqlcmd, osql and isql with the -L option as shown below. Using sqlcmd -L Servers: SQLServer1 SQLServer2\DBServer SQLServer3\ReportServer SQLServer4\SQLExpress SQLServer5

» Read more

SQL Server – Table-Valued Parameters

Table-valued parameters are a new parameter type introduced in SQL Server 2008. With the help of table-valued parameters, you can send multiple rows of data to a stored procedure or function, without creating a temporary table or many parameters. Steps to create Table-Valued Parameters Create a table type and define

» Read more

SQL Server – Inside of Next Generation SQL Server – Denali

Today I have attended the webcast topic “Inside of Next Generation SQL Server – Denali” at Zeollar.com. This session presented by Pinal Dave (http://blog.sqlauthority.com) It was really a nice presentation about features of SQL Server 2011 – Denali.  You can get the details of this session at here You can

» Read more

SQL Server – Local temporary table vs. Global temporary table

Temporary tables are a useful feature provided by SQL Server. Temporary tables created at runtime and can do all kinds of operations that one normal table can do. Because this is available at runtime, that’s why the scope of temporary tables is limited. These tables are created inside the tempdb

» Read more

SQL Server – Collation Sequences

Collation sequence control how server treats character data for storage, retrieval, and sorting and comparison operation. SQL Server 2008 allows you to specific sequence to support any language currently used around the word. Collation sequence can be specified at instance, database, table and column level. The only collation sequence that

» Read more

SQL Server – Database Read Only

Here is simple script with you can set your database in Read-Only Mode Once you specify database is in read-only mode then users can read data from the database, not modify it. Here is Script : Mark Database Read Only USE [master] GO ALTER DATABASE database_name SET READ_ONLY WITH NO_WAIT

» Read more

SQL Server – Management Studio – Add an External Tool to the Tools Menu

We can launch any Microsoft Windows or Microsoft .NET Framework application from SQL Server Management Studio. External applications can be added to, and run from, the Tools menu. To add an external tool to the Tools menu On the Tools menu, click External Tools. In the Title text box, type the name you

» Read more
1 6 7 8 9 10