DotNetShoutout - Stories tagged with T-SQL
3
Shouts

SQL Server BCP Utility with sp_HelpText to Generate Script File for Each Stored Procedure in a Database

published 466 days, 19 hours, 42 minutes ago posted by eralpereralper 470 days, 33 minutes ago
Monday, February 13, 2012 8:04:31 PM GMT Friday, February 10, 2012 3:12:42 PM GMT
SQL Server BCP utility is used to write sql query results to text files into a file folder. If T-SQL developers use SQL BCP with sp_HelpText, it is possible to generate script files for SQL Server objects too. (more)
category: Data | clicked: 20 | comment | | source: www.kodyaz.com
tags: SQL Server, BCP, SQL, T-SQL
2
Shouts

List Month Names using SQL Functions

published 469 days, 22 hours, 46 minutes ago posted by eralpereralper 473 days, 42 minutes ago
Friday, February 10, 2012 5:00:19 PM GMT Tuesday, February 07, 2012 3:04:13 PM GMT
List Month Names using SQL Functions SQL developers may need to list month names using SQL functions during their T-SQL programming tasks. This Transact-SQL tutorial will demonstrate sql codes with DATENAME() function that ca... (more)
category: Data | clicked: 9 | comment | | source: www.kodyaz.com
tags: SQL Server, SQL, T-SQL
2
Shouts

SQL LEAD() Function in SQL Server 2011 for Calculating Next Value

posted by eralpereralper 675 days, 8 hours, 50 minutes ago
Wednesday, July 20, 2011 6:56:08 AM GMT
SQL LEAD() function is one of the recent enhancements among SQL Analytic Functions introduced with Denali, CTP3 for SQL Server 2011 developers. What SQL Server Lead() function does is returning simply the next Nth row value in an order (more)
category: Data | clicked: 2 | comment | | source: www.kodyaz.com
tags: function, SQLServerDenali, T-SQL, SQLServer
3
Shouts

New T-SQL Functions in SQL Server 2011 for T-SQL Developers

published 678 days, 7 hours, 8 minutes ago posted by eralpereralper 682 days, 19 hours, 30 minutes ago
Sunday, July 17, 2011 8:37:44 AM GMT Tuesday, July 12, 2011 8:16:15 PM GMT
Microsoft SQL Server 2011 introduces new functions for T-SQL developers with SQL Server Denali CTP3 version. These 14 new T-SQL built-in functions are part of T-SQL and programmability enhancements for developers in SQL Server 2011 (more)
category: Data | clicked: 12 | comment | | source: www.kodyaz.com
tags: SQL Server, T-SQL, denali, SQL Server 2011
3
Shouts

SQL Analytic Functions new in SQL Server 2011 for T-SQL Developers

published 678 days, 7 hours, 8 minutes ago posted by eralpereralper 682 days, 19 hours, 31 minutes ago
Sunday, July 17, 2011 8:37:44 AM GMT Tuesday, July 12, 2011 8:14:53 PM GMT
Microsoft SQL Server 2011 introduces Analytic Functions for T-SQL developers with SQL Server Denali CTP3 version. Analytic functions have been in Oracle database platform for PL/SQL programmers for a while. Analytic functions in SQL Server is a new enhancement for tsql programmers with SQL Server 2011, aka Denali (more)
category: Data | clicked: 4 | comment | | source: www.kodyaz.com
tags: T-SQL, denali, SQL Server 2011
7
Shouts

Create Date and Time Intervals Table in SQL Server using Numbers Table and Dateadd

published 723 days, 9 hours, 55 minutes ago posted by eralpereralper 725 days, 10 hours, 21 minutes ago
Thursday, June 02, 2011 5:51:24 AM GMT Tuesday, May 31, 2011 5:24:41 AM GMT
Time schedule table or date table is frequently required by sql developers during t-sql coding. In this t-sql tutorial I want to give some sql hints that SQL programmers can use in their daily works. You will see that the following sql samples use SQL Server numbers table code in order to create a periodic time blocks or time intervals for different purposes (more)
category: Data | clicked: 10 | comment | | source: www.kodyaz.com
tags: SQL Server, T-SQL
6
Shouts

SQL Running Total Sample in SQL Server 2008

published 723 days, 9 hours, 55 minutes ago posted by eralpereralper 725 days, 10 hours, 25 minutes ago
Thursday, June 02, 2011 5:51:24 AM GMT Tuesday, May 31, 2011 5:21:14 AM GMT
Calculating sql running total in SQL Server queries is a common task for most of t-sql developers. In order to display running totals for a quantity or amount column, easiest method in SQL Server is using t-sql CTE (Common Table Expression) structures (more)
category: Data | clicked: 21 | comment | | source: www.kodyaz.com
tags: SQL Server, T-SQL
2
Shouts

SQL Server Instead Of Trigger with Sequence Table Sample

published 735 days, 7 hours, 56 minutes ago posted by eralpereralper 737 days ago
Saturday, May 21, 2011 7:50:32 AM GMT Thursday, May 19, 2011 3:45:43 PM GMT
Using SQL Server Instead of Trigger defined on a table in combination with a sequence table and T-SQL features like SQL Output clause and T-SQL Row_Number function I will show how to insert the identity column value of a table from the sequence table. I faced this sql problem while talking with a SQL developer friend of mine. He was required to use a sequence table in a Microsoft SQL Server 2008 database. Perhaps you already know, a new feature in Denali or SQL Server 2011 is SQL Sequence table usage. B... (more)
category: Data | clicked: 3 | 1 comment | | source: www.kodyaz.com
tags: SQL Server, SQL Server 2008, SQL, T-SQL, Trigger
4
Shouts

Use xp_dirtree SQL Server Stored Procedure and Recursive CTE Query to List Hierarchical Structure of File Folders

published 825 days, 21 hours, 31 minutes ago posted by tsqltsql 829 days, 6 hours, 40 minutes ago
Saturday, February 19, 2011 6:14:56 PM GMT Wednesday, February 16, 2011 9:05:49 AM GMT
Use xpdirtree SQL Server Stored Procedure and Recursive CTE Query to List Hierarchical Structure of File Folders T-SQL developers can use xpdirtree SQL Server stored procedure to display subdirectory list beneath a given file folder as input parameter. xpdirtree extended stored procedure is one of the SQL Server undocumented stored procedures. In this SQL tutorial, we will use SQL Server xpdirtree stored procedure with T-SQL recursive CTE query in order to list hierarchical structure of file folders. (more)
category: Data | clicked: 35 | comment | | source: www.kodyaz.com
tags: SQL Server, SQL, T-SQL
2
Shouts

How to Create Full Database Backup on MS SQL Server for a Database using Backup Database command and SqlCmd Utility

posted by eralpereralper 869 days, 4 hours, 41 minutes ago
Friday, January 07, 2011 11:04:50 AM GMT
Below is the t-sql statement which takes a full database backup of a given SQL Server database with database name as a parameter to a given file folder as parameter on the same server or computer. In order to complete the creating a full database sql backup task, we will use the T-SQL BACKUP DATABASE statement. (more)
category: Data | clicked: 0 | comment | | source: www.kodyaz.com
tags: SQL Server, SQL, T-SQL, backup, Database
2
Shouts

Case Sensitive SQL Split Function

published 902 days, 7 hours, 6 minutes ago posted by eralpereralper 903 days, 4 hours, 10 minutes ago
Sunday, December 05, 2010 8:40:15 AM GMT Saturday, December 04, 2010 11:35:49 AM GMT
In this T-SQL tutorial, SQL developers can find a sample sql case sensitive split string function. This sample SQL split string function identifies upper case letters and behaves as the start of a new word. For example, let the input argument to the case sensitive sql split function be "ThisIsASqlServerCaseSensitiveSplitStringFunction". We expect the output of the sql split function as identifying the words just like in the sentence : "This Is A Sql Server Case Sensitive Split String Function" (more)
category: Data | clicked: 4 | comment | | source: www.kodyaz.com
tags: SQL Server, Split, SQL, T-SQL
4
Shouts

SQL Paging in SQL Server 2011 using SQL ORDER BY OFFSET and FETCH NEXT

published 911 days, 13 hours, 17 minutes ago posted by eralpereralper 913 days, 9 hours, 25 minutes ago
Friday, November 26, 2010 2:29:08 AM GMT Wednesday, November 24, 2010 6:21:16 AM GMT
One of the major SQL Server 2011 features related with t-sql programming enhancements is the SQL paging using ORDER BY OFFSET n ROWS and FETCH NEXT n ROWS ONLY syntax. In this sql tutorial, while showing one of the new t-sql features in SQL Server 2011 Denali, I will use the sample SQL database AdventureWorks download from CodePlex (more)
category: Data | clicked: 0 | 2 comments | | source: www.kodyaz.com
tags: Paging, SQL, T-SQL, denali, SQL Server 2011
3
Shouts

SQL Sequences and Create Sequence of Numbers in SQL Server 2011

published 912 days, 18 hours, 46 minutes ago posted by eralpereralper 913 days, 9 hours, 26 minutes ago
Wednesday, November 24, 2010 9:00:16 PM GMT Wednesday, November 24, 2010 6:19:46 AM GMT
In SQL Server, t-sql developers sometimes require to create sequence of numbers which will be used in more than one sql tables. One of the SQL Server 2011 features and enhancements in t-sql development is Sequence Objects. A SQL Server sequence object generates sequence of numbers just like an identity column in sql tables. But the advantage of sequence numbers is the sequence number object is not limited with single sql table. There is no direct relation between tables, table identity columns and num... (more)
category: Data | clicked: 0 | comment | | source: www.kodyaz.com
tags: sequence, T-SQL, denali, SQL Server 2011
2
Shouts

SQL Trigger Example in SQL Server 2008

published 944 days, 18 hours, 18 minutes ago posted by eralpereralper 946 days, 5 hours, 3 minutes ago
Saturday, October 23, 2010 9:27:43 PM GMT Friday, October 22, 2010 10:43:30 AM GMT
What is SQL Server Trigger An SQL trigger can contain sql codes that are executed automatically by SQL Server engine when a certain event occurs. Since this sql tutorial is concentrated on DML (Data Manipulation Language) concepts right now, our sql code examples will be a DML sql trigger. And the following SQL Server trigger definition will be valid for DML commands. The events that trigger SQL Server triggers which are actually stored t-sql codes are sql INSERT, UPDATE and DELETE statements executed... (more)
category: Data | clicked: 3 | comment | | source: www.kodyaz.com
tags: SqlServer 2008, SQL, T-SQL, Trigger, SQLServer, sqlserver2005
4
Shouts

Kodyaz Development Resources

published 954 days, 21 hours, 14 minutes ago posted by eralpereralper 956 days, 2 hours, 44 minutes ago
Wednesday, October 13, 2010 6:32:01 PM GMT Tuesday, October 12, 2010 1:02:11 PM GMT
Problem Statement: In your SQL Server database you have two database tables to store expenses and payments for closing expense amount. You want to list the expenses of a customer using t-sql by querying your sql tables. This list will also add the payments done by the same customer to close these expenses. Each payment will be listed as new columns beside the expenses records. (more)
category: Data | clicked: 1 | comment | | source: www.kodyaz.com
tags: SQL Server, CTE, SQL Server 2008, SQL, T-SQL, SQL Server 2005
4
Shouts

SQL Server Manager select and kill process query

published 961 days, 1 hour, 9 minutes ago posted by eralpereralper 963 days, 4 hours, 20 minutes ago
Thursday, October 07, 2010 2:36:58 PM GMT Tuesday, October 05, 2010 11:26:33 AM GMT
Who is hogging the database process? This question can be hard to answer if you don’t have the right tools to view the Activity monitor. (more)
category: Data | clicked: 0 | comment | | source: www.ninjacoding.net
tags: SQL, T-SQL, SQLServer
6
Shouts

SQL Server Error Handling

published 964 days, 5 hours ago posted by BlackWaspBlackWasp 965 days, 4 hours, 2 minutes ago
Monday, October 04, 2010 10:46:13 AM GMT Sunday, October 03, 2010 11:43:58 AM GMT
Microsoft SQL Server 2005 introduced new error handling capabilities for scripts and stored procedures. This article describes the use of the try / catch block in Transact-SQL that permits errors to be captured and allows for graceful recovery. (more)
category: Data | clicked: 1 | comment | | source: www.blackwasp.co.uk
tags: T-SQL, SQLServer
2
Shouts

kCodebook

posted by kevlangdokevlangdo 970 days, 14 hours, 7 minutes ago
Tuesday, September 28, 2010 1:39:13 AM GMT
Anybody who has worked with Oracle databases and queries knows how useful the Merge command (function) is. Alas, in the Sql Server (Transact-SQL or T-SQL for short) world this function is lacking fro a long time.  There is a new function in T-SQL that performs a similar role, Merge, that came with the release of Microsoft SQL Server 2008. Anyone who has used the Merge function before will find it very similar. For those who are new to the function, they will find it very straight forward and versatile. ... (more)
category: Data | clicked: 0 | comment | | source: kcodebook.com
tags: SQL Server 2008, merge, T-SQL
2
Shouts

How to use order by with Union in SQL : The CodeGain

posted by codegaincodegain 970 days, 14 hours, 27 minutes ago
Tuesday, September 28, 2010 1:19:09 AM GMT
In this code snippet, you will learn how to use the order by with Union or Union All (more)
category: Data | clicked: 0 | comment | | source: www.codegain.com
tags: T-SQL, Database
3
Shouts

Check string contains numbers in T-SQL

published 1011 days, 23 hours, 25 minutes ago posted by PraveenPraveen 1012 days, 4 hours, 44 minutes ago
Tuesday, August 17, 2010 4:21:41 PM GMT Tuesday, August 17, 2010 11:01:50 AM GMT
I know this is looking very simple when we read. But, I had a requirement where I need to filter strings from string data type column in T-SQL. Means, some strings in database having numbers in them, and I need to get them out and do some processing. When I started implementing this, I had so many ideas and thought like, looping through all characters in each string and check whether it has numbers in it or not. But, this is not effi... (more)
category: Data | clicked: 0 | comment | | source: praveenbattula.blogspot.com
tags: SQL Server, T-SQL
Previous 1 2 Next