< 1 2 3 4 5 6 7 > >>   ∑:509  Sort:Date

FLOOR, CEILING, ROUND - Converting Values to Integers in SQL Server
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a numeric value into an integer. SQL Server 2005 offers you a number of ways to do this: FLOOR(value) - Returning the largest integer less than or equal to the input value. The returning data type is th...
2017-03-22, 5223🔥, 0💬

sys.server_principals - Listing All Login Names in SQL Server
How To List All Login Names on the Server in SQL Server? If you want to see a list of all login names defined on the server, you can use the system view, sys.server_principals as shown in this tutorial exercise: -- Login with sa SELECT name, sid, type, type_desc FROM sys.server_principals WHERE type...
2016-10-20, 5214🔥, 0💬

DYNAMIC - Creating Dynamic Cursors in SQL Server
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying table is changed after the cursor is opened, should the changes be reflected in the cursor result set? The answer is based on the update option used when creating the cursor. SQL SERVER supports two ...
2016-10-17, 5081🔥, 0💬

CHAR(n) - Truncating/Padding Strings in SQL Server Transact-SQL
How Fixed Length Strings Are Truncated and Padded in SQL Server Transact-SQL? When the length of the input string does not match the storage size of the fixed length string data type CHAR(n). SQL Server will: If the input string of CHAR(n) has less than n bytes, it will be padded with space characte...
2017-05-13, 4982🔥, 0💬

"IF ... ELSE IF ..." Statement Structures in SQL Server
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ..." statement structure is used to select one of the specified statements to be executed based on specified Boolean conditions. Here is the syntax of "IF ... ELSE IF ..." statement structure: IF conditi...
2017-01-11, 4972🔥, 0💬

Downloading and Installing Microsoft .NET Framework Version 2.0 in SQL Server
How to download and install Microsoft .NET Framework Version 2.0 in SQL Server? .NET Framework Version 2.0 is required by many Microsoft applications like SQL Server 2005. If you want download and install .NET Framework Version 2.0, you should follow this tutorial: 1. Go to the Microsoft .NET Framew...
2016-12-08, 4934🔥, 0💬

NULLIF() - Replacing Given Values with NULL in SQL Server
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want to hide certain values by replacing them with NULL values. SQL Server offers you a nice function called NULLIF() to do this: NULLIF(expression, value) -- Returns NULL if "expression" equals to value" -...
2017-01-29, 4918🔥, 0💬

"ALTER USER" - Changing the Name of a Database User in SQL Server
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existing database user, you can use the "ALTER USER" statement as shown in the tutorial exercise below: -- Login with "sa" USE FyiCenterData; GO ALTER USER Fyi_User WITH NAME = Dba_User; GO -- List all user...
2022-01-24, 4644🔥, 0💬

Converting Binary Strings into Integers in SQL Server
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers are convertible implicitly and explicitly. But there several rules you need to remember: Binary strings will be implicitly converted into an integer data type, if it is involved in an arithmetical ope...
2017-02-28, 4607🔥, 0💬

Converting Unicode Strings to Non-Unicode Strings in SQL Server
How To Convert a Unicode Strings to Non-Unicode Strings in SQL Server Transact-SQL? Since Unicode character set is different than code page based (non-Unicode) character set, converting Unicode strings to non-Unicode strings may result in wrong characters or missing characters. So you should avoid c...
2017-03-07, 4273🔥, 0💬

DATEADD() Function Usage Examples in SQL Server
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for manipulating date and time values. The following tutorial exercise shows you some good DATEADD() usage examples: -- Incrementing 1 year on a leap date DECLARE @birth_date DATETIME; SET @birth_date = '20...
2017-02-20, 4184🔥, 0💬

Difference Between GETDATE() and GETUTCDATE() in SQL Server
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference between GETDATE() and GETUTCDATE() is time zone number of the SQL Server machine. The tutorial exercise below gives you a good example: DECLARE @local_time DATETIME; DECLARE @gmt_time DATETIME; SET @...
2017-02-14, 4122🔥, 0💬

WHILE ... Loops in SQL Server Transact-SQL
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can use WHILE ... statements to execute statements in loops in Transact-SQL using these syntaxes: -- Loop with a single statement WHILE condition statement -- Loop with a statement block WHILE condition --...
2017-01-11, 4047🔥, 0💬

Connecting SQL Server Management Studio Express To a SQL Server in SQL Server
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once you have SQL Server 2005 Express installed and running on your local machine, you are ready to connect SQL Server Management Studio Express to the server: Click Start &gt; Programs &gt; Microso...
2016-12-04, 3991🔥, 0💬

Single-Byte Character Data Types in SQL Server Transact-SQL
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte character string data types are used to hold single-byte character strings. There are 3 single-byte character string data types supported in SQL Server Transact-SQL: 1. CHAR (or CHARACTER) - Used to ho...
2017-04-08, 3780🔥, 0💬

Entering 0.001 Second in DATETIME in SQL Server Transact-SQL
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter milliseconds in data and time values, they will be rounded up to 10/3 millisecond increments, because DATETIME data type uses 4 bytes to store the time of the day. A 4-byte integer can only give an accuracy ...
2017-04-15, 3730🔥, 0💬

CONVERT() - Formatting DATETIME Values to Strings in SQL Server
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL Server 2005 offers no functions to format DATETIME values in your own format patterns. But it does provide you a number of pre-defined format patterns that you can use with the CONVERT(char_type, dat...
2017-02-08, 3725🔥, 0💬

Verifying a User Name with SQLCMD Tool in SQL Server
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in a database is probably to use the SQLCMD tool. You can connect to the server, select the database, and check which user name is linked the current login name as shown below. Start a command window and...
2017-08-25, 3709🔥, 0💬

Downloading and Installing SQL Server Sample Scripts in SQL Server
How to download and install SQL Server 2005 Sample Scripts in SQL Server? If you want to learn from sample scripts provided by Microsoft, you should follow this tutorial to download and install them: 1. Go to the SQL Server 2005 Samples and Sample Databases download page . 2. Go to the x86 section i...
2019-11-08, 3658🔥, 2💬

💬 2019-11-08 FYIcenter.com: @Nana, please follow AdventureWorksLT - Downloading and Installing the Sample Database in SQL Server tutorial.

💬 2019-10-31 Nana Jacob: Please i need to download AdventureWorksLT

sqlservr.exe - Process - SQL Server (SQLEXPRESS) in SQL Server
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the Microsoft SQL Server system service installed as part of the Microsoft SQL Server 2005 Express Edition. mscorsvw.exe process and program file info: CPU usage: 00% Memory usage: 1,316K Launching metho...
2016-12-08, 3618🔥, 0💬

Conditional Statements and Loops in SQL Server in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com team on Conditional Statements and Loops in SQL Server Transact-SQL. Clear answers are provided...
2017-01-11, 3617🔥, 0💬

Formatting Time Zone in +/-hh:mm Format in SQL Server
How To Format Time Zone in +/-hh:mm Format in SQL Server Transact-SQL? From the previous tutorial, you know how to calculate the time zone value by using GETDATE() and GETUTCDATE() functions. But how can you format that time zone value in a nice looking format like +05:45 or -04:00? Unfortunately, S...
2017-02-08, 3583🔥, 0💬

DDL (Data Definition Language) Statements for Tables? in SQL Server
What are DDL (Data Definition Language) statements for tables in SQL Server? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are three primary DDL statements to create and manage tables: CREATE TABLE - Creating a new table. ALTER TABLE ...
2016-11-20, 3581🔥, 0💬

Selecting All Columns of All Rows from a Table in SQL Server
How To Select All Columns of All Rows from a Table with a SELECT statement in SQL Server? The simplest query statement is the one that selects all columns of all rows from a single table: "SELECT * FROM tableName". The (*) in the SELECT clause tells the query to return all columns. The missing WHERE...
2016-10-26, 3574🔥, 0💬

< 1 2 3 4 5 6 7 > >>   ∑:509  Sort:Date