The SQL Server function in this post can be used to highlight text (while preserving the case) that has been searched for within a web page.
Category: SQL Server
The Transact-SQL script in this post which was written for SQL Server 2005, returns a list of the values and a count for each and every field within a table. You just need to change the schema name and table name, and specify a limit (if needed) for the number of values returned for each field.
I have just found a very useful article from SQLServerCentral.com, that goes through the process of replacing multiple spaces with one. “Replacing multiple spaces with a single space is an old problem that people use loops, functions, and/or Tally tables for. Here’s a set based method for replacing multiple spaces from MVP Jeff Moden” http://www.sqlservercentral.com/articles/T-SQL/68378/
Today, I came across this error, that occurred when running an existing SSIS package: Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: “Syntax error in parameters or arguments. The server response was: 5.5.4 Invalid Address” After lengthy investigation, I discovered that one of the email addresses […]
I have just found a very good website that lists the various version numbers for SQL Server. You can see from the list which services packs and updates have been applied. http://www.sqlteam.com/article/sql-server-versions
The script in this post can be used to extract a list of databases along with the files associated with each database. The size (according to SQL Server) is also returned in pages and bytes.
The Save (Not Permitted) dialog box warns you that saving changes is not permitted because the changes you have made require the listed tables to be dropped and re-created. The following actions might require a table to be re-created: Adding a new column to the middle of the table Dropping a column Changing column nullability […]
Whenever I tried to connect to Analysis Services using the SQL Server Management Studio 2008, I was getting the following error: Cannot connect to [Computer Name]\[Instance Name]. A connection cannot be made. Ensure that the server is running. (Microsoft.AnalysisServices.AdomdClient) No connection could be made because the target machine actively refused it ::1:54226 (System) I trawled […]
Useful script to generate a list of tables for all the databases on a server
The query in this post return a list of Table Name, Column Name, and Column ID for all Primary Key columns within a database
Use this query (in this post) to produce a list of foreign key relationships, including the referencing and referenced table and column
The Transact-SQL query in this post returns the table name, column name, data type, and maximum length. This is useful when producing database documentation