This Blog Has Moved!
Please Follow my new blog @ http://marlonribunal.com
I have long abandoned this blog and moved to my permanent home-blog at
But I am here again to tell you about my book: SQL Server 2012 Reporting Services Blueprints.
If you want to learn SSRS or deepen your knowledge about it, you may want to grab a copy of this book.
I have more information on my blog: SQL Server 2012 Reporting Services Blueprints
Come visit me on my home-blog: SQL, Code, Coffee, etc.
Find User Tables and Their Columns Info in SQL Server Using Object Catalog Views (Repost)
[Update 07-09-09: Added MSDN Link at the bottom]
Here’s a quick TSQL solution that you can use to find all the User Tables and their Columns, inluding Data Types, and Column size. This is useful when you need a quick way of finding info on creating your Database’s documentation. Whenever I am asked to document a new system/application or review an existing one, I always want to start from the very core of the system – mostly, this is a Database backend.
SELECT t.name AS [TABLE Name],
c.name AS [COLUMN Name],
p.name AS [DATA Type],
+ CAST(p.scale ASVARCHAR) AS [PRECISION/Scale]
UPDATE: MSDN LINK
Querying the SQL Server System Catalog FAQSQL Server 2005 | SQL…
View original post 4 more words
SQL Server 2005 Back TSQL Basics (Reblog)
Most of the people, if not all, who work around the SQL Server know how to backup their databases by heart. They can even do the task in their sleep. Some may find this article useful, though.
What we’re going to do here is do the 3 backup types: Full, Differential, and Transaction Log Backups.
Here’s how to backup a SQL Server Database (suppose we’re backing up the AdventureWorks Database):
1. Create a directory: C:\myBackUpDir (you may want to create this in a separate physical disk)
2. Open SSMS, and connect to the instance. Open a new query.
3. Execute a Full Backup:
BACKUP DATABASE AdventureWorks TO DISK = ‘ C:\myBackUpDir\ADVWRKS.BAK’
4. Since we also want to create a Differential backup, make any change to one of the tables in the AdventureWorks Database. Next, we want to backup the Transaction Log and capture the change that has been made. Execute:
View original post 115 more words
Adding “ALL” Parameter in SSRS (Reblog)
One of the most common business requirements for SQL Server Reporting Services is that an SSRS Report should be dynamic. Dynamic in a sense that the report consumer can query the report in a variety of ways. In this post, I will demonstrate how you can add a parameter value “ALL” to return all of the desired result.
I have four parameters in this report; all of them are optional (can be NULL). I will demonstrate the optionality in a different post. For the mean time, let me demonstrate how to add “ALL” in a parameter.
My parameter, which we alias here as “param1”, is optional. Here is how I created my statement in TSQL and wrapped it in a Stored Procedure:
View original post 21 more words