Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Content with tags T-SQL, Dynamic SQL Rss

   Items 1 to 15 of 15   
 

Dynamic Table Name on Select Into

Based upon todays date as suffix and chosen string as prefix, select data from predefined table into dynamically named new table. Script is properly error handled with most common errors  Read more...
By Jo Dacey 2016/07/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,086 reads

sp_executesql

By Steve Jones 2016/06/30 | Category: sp_executesql
Rating: (not yet rated) |  Discuss |   Briefcase | 1,369 reads

Dynamic Table Name on Select Into

Based upon todays date as suffix and chosen string as prefix, select data from predefined table into dynamically named new table. Script is properly error handled with most common errors  Read more...
By Jo Dacey 2016/07/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,086 reads

Legal/illegal characters in table name

By Honey Badger 2015/04/08 | Category: create table
Rating: (not yet rated) |  Discuss |   Briefcase | 2,049 reads

How to Design, Build and Test a Dynamic Search Stored Procedure

Learn how to design, build and test a dynamic search SP in just a few simple but methodical steps.  Read more...
By Dwain Camps 2015/03/06 (first published: 2013/11/05) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 20,059 reads

EXECUTE

By Steve Knox 2014/12/09 | Category: execute
Rating: (not yet rated) |  Discuss |   Briefcase | 1,944 reads

How to Design, Build and Test a Dynamic Search Stored Procedure

Learn how to design, build and test a dynamic search SP in just a few simple but methodical steps.  Read more...
By Dwain Camps 2015/03/06 (first published: 2013/11/05) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 20,059 reads

Executing Dynamic SQL

By Kshitij Satpute 2013/09/26 | Category: dynamic sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,836 reads

Best practice recommendations for writing Dynamic SQL

Note this is not “Best Practices when USING Dynamic SQL”. These are just good habits I’ve come up with over...  Read more...
By Kenneth Fisher 2013/06/13 | Source: SQLServerCentral.com | Category: blogs
Rating: (not yet rated) |  Discuss |   Briefcase | 4,487 reads

Methods For Converting a Stored Procedure

An interesting use of T-SQL to run a stored procedure as part of a SELECT statement to get a result set to be used and combined with other tables. From Eli Leiba, learn how you can build a stored procedure into your queries.  Read more...
By Eli Leiba 2011/04/08 (first published: 2009/10/29) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 29,840 reads

Using Dynamic SQL in Stored Procedures

Dynamic SQL allows stored procedures to “write” or dynamically generate their SQL statements. The most common use case for dynamic SQL is stored procedures with optional parameters in the WHERE clause. These are typically called from reports or screens that have multiple, optional search criteria. This article describes how to write these types of stored procedures so they execute well and resist SQL injection attacks.   Read more...
By Additional Articles 2011/03/22 | Source: SQLTeam.com | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 6,882 reads

Script Table or View structure

This code will let you script a Table or Views structure for source control.   Read more...
By Pratap Prabhu 2010/02/02 | Source: SQLServerCentral.com | Category: scripting
Rating: |  Discuss |   Briefcase | 2,135 reads

Methods For Converting a Stored Procedure

An interesting use of T-SQL to run a stored procedure as part of a SELECT statement to get a result set to be used and combined with other tables. From Eli Leiba, learn how you can build a stored procedure into your queries.  Read more...
By Eli Leiba 2011/04/08 (first published: 2009/10/29) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 29,840 reads

Using the CASE expression instead of dynamic SQL

I have a lot of SQL update queries where I need to make IF/ELSE types of decisions. I am using a cursor in some cases but looping through thousands of rows for update takes a long time. I also use some dynamic SQL to handle some query parameter decision making. Is there a better alternative?  Read more...
By Additional Articles 2008/03/20 | Source: MSSQLTips.com | Category: t-sql
Rating:  Rate this |   Briefcase | 6,347 reads

The curse and blessings of dynamic SQL

How you use dynamic SQL, when you should - and when you should not.   Read more...
Rating:  Rate this |   Briefcase | 6,156 reads
   Items 1 to 15 of 15   
 
Tags
sp_executesql (2)    
stored procedures (2)    
blogs (1)    
create table (1)    
execute (1)    
scripting (1)    
sql dynamic search query (1)    
structure (1)