T-SQL (Transact Structured Query Language) is the extension of SQL functionality supported by Sybase ASE and Microsoft SQL Server.
I have a string that is up to 3 characters long when it's first created in SQL Server 2008 R2. I would …
sql-server tsqlI just need to select the first day of the month of a given datetime variable. I know it's quite …
sql sql-server tsql sql-server-2008 datetimeWe all know that to select all columns from a table, we can use SELECT * FROM tableA Is there a …
sql sql-server tsqlI'm trying to set a variable from a SQL query: declare @ModelID uniqueidentifer Select @ModelID = select modelid from models where …
sql sql-server tsqlIs it possible to use an IF clause within a WHERE clause in MS SQL? Example: WHERE IF IsNumeric(@OrderNumber) = 1 …
sql sql-server tsqlUsing SQL Server, how do I split a string so I can access item x? Take a string "Hello John …
sql sql-server tsql splitI want to get only Time from DateTime column using SQL query using SQL Server 2005 and 2008 Default output: AttDate == 2011-02…
sql-server tsql sql-server-2005 datetimeI have the following code in one of my Sql (2008) Stored Procs which executes perfectly fine: CREATE PROCEDURE [dbo].[Item_…
sql sql-server tsql sql-server-2008Which method provides the best performance when removing the time portion from a datetime field in SQL Server? a) select …
sql sql-server tsql datetime dateI know I've done this before years ago, but I can't remember the syntax, and I can't find it anywhere …
sql-server tsql sql-server-2005 insert