Category Archives: SQL Server 2005/2008

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.

So you are geting this warning ? Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled … Continue reading

Posted in SQL Server 2005/2008 | 2 Comments

MS SQL 2005/2008 – Query to ALL table names with its field information for a database.

MS SQL 2005/2008 – Query to ALL table names with its field information for a database. This is the easier way to do this, and you can also do it for a specific table by filtering the data.  SELECT * FROM … Continue reading

Posted in SQL Server 2005/2008 | Leave a comment

SSRS Exporting Report to Excel – Keep Formatting on Export

While creating Reporting Services (SSRS) reports, I usually use Format Functions around values to make the report look good (mostly for Number with decimal and comma). By doing that way while export to Excel we may lose the ability to sum … Continue reading

Posted in SQL Server 2005/2008 | 1 Comment

SQL Trace Tools

You can use this tool. http://www.scalesql.com/cleartrace/ This gives output in the following format and it’s a very handy tool. SP / Function Count CPU Average CPU Reads    Average Reads  Writes   Average Writes Duration              Average Duration

Posted in SQL Server 2005/2008 | Leave a comment

Database diagram Tool – SQuirreL

One interesting open source tool SQuirreL that i have found to draw Database diagram, More comments later.    http://squirrel-sql.sourceforge.net/index.php?page=screenshots  http://squirrel-sql.sourceforge.net/screenshots/graph.png

Posted in SQL Server 2005/2008 | Leave a comment

SQL function to convert number to words

Can’t claim credit for this. I got this from SQLTeam.com quite sometime ago. Lost the link. CREATE FUNCTION dbo.fn_num_to_words ( @n bigint ) RETURNS varchar(1000) AS BEGIN RETURN ( SELECT CASE (@n / 1000000) % 10 WHEN 1 THEN ‘one’ … Continue reading

Posted in SQL Server 2005/2008 | Leave a comment

SQL SERVER – 2005: List of all Tables of Database

Ananth Ramasamy Meenachi – http://www.msarm.com To get all the tables in the database, we can just query with system table (sys.Tables) USE DBName GO SELECT * FROM sys.Tables GO Returns all the tables in the database which user have created.

Posted in SQL Server 2005/2008 | Leave a comment