T-SQL (Transact Structured Query Language) is the extension of SQL functionality supported by Sybase ASE and Microsoft SQL Server.
What is the syntax of a for loop in TSQL?
sql sql-server loops tsql syntaxI was wondering if there was a way to do this in MS SQL Server 2005: DECLARE @theDate varchar(60) SET @theDate = …
sql sql-server sql-server-2005 tsql dynamic-sqlI have been getting the following error when running a SQL to convert my data type value from varchar to …
sql-server tsql datetimeI'll use a concrete, but hypothetical, example. Each Order normally has only one line item: Orders: OrderGUID OrderNumber ========= ============ {FFB2...} STL-7442…
sql sql-server tsql sql-server-2000UPDATE dbo.TestStudents SET LASTNAME = ( CASE WHEN (LASTNAME = 'AAA') THEN 'BBB' WHEN (LASTNAME = 'CCC') THEN 'DDD' WHEN (LASTNAME = 'EEE') THEN …
sql sql-server tsql sql-updateI would like to replace (or remove) a newline character in a TSQL-string. Any Ideas? The obvious REPLACE(@string, CHAR(13), …
tsql newlineHow do I simply switch columns with rows in SQL? Is there any simple command to transpose? ie turn this …
sql sql-server tsql pivotHow do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date2, Date3, Cost] I …
sql sql-server tsqlI have a development database that re-deploy frequently from a Visual Studio Database project (via a TFS Auto Build). Sometimes …
sql sql-server tsql sql-server-2008 sql-server-2008-r2I have a SQL script that has to be run every time a client executes the "database management" functionality. The …
sql sql-server tsql stored-procedures