Whenever you need to pull a quick definition of a table in SQL Server. Here's the SQL command (T-SQL) to get the table definition in a database: The result would be something similar to this: COLUMN_NAME DATA_TYPE IS_NULLABLE AccountNo int(10,0) YES AccountName varchar(50) YES Balance money(10,2) … [Read more...]
How to Use Custom Color in SSMS Using Redgate SQL Prompt
Continuing the two previous posts on employing custom color in SSMS using the built-in feature or SSMS Tools Pack to reduce error in connecting to a wrong environment, if you have access to Redgate SQL Prompt, this might be the easiest and best option to use. It's so easy to configure as demonstrated that many developers overlook this feature. You can certainly use the default but for the sake … [Read more...]
How to Build SSIS Package for Different SQL Server Version with Visual Studio 2017 and SSDT
After deploying an SSIS package built with Visual Studio 2017, we encountered a surprise when running it via a Command Prompt: Pay attention to this section of error message: Description: Package migration from version 8 to version 6 failed with error 0xC001700A "The version number in the package is not valid. The version number cannot be greater than current version … [Read more...]
How to Use SQL Server Express to Store ASP.NET Session State
ASP.NET Session State SQL Server Mode provides a good way to have a persistent session, especially for server farm configuration. Here are the steps to quickly configure the environment to do so using SQL Server Express edition (because sometimes, you don't need the full-blown version of SQL Server just to track sessions). Steps Download and install SQL Server Express. Open the file, … [Read more...]
How to Show Field Values as Columns in SQL Server
One of the most asked questions by users when they pull data using T-SQL is whether or not there's a way to present the values of a field they're interested in as columns instead. The answer is of course it's "Yes." You can achieve this by using PIVOT relational operator if you use . Without PIVOT With PIVOT Further Reading Using PIVOT and UNPIVOT SQL Server 2019 Revealed: … [Read more...]