Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Content with tags T-SQL, Dynamic SQL Rss

   Items 1 to 8 of 8   
 

Executing Dynamic SQL

By Kshitij Satpute 2013/09/26 | Category: dynamic sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,766 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 | 3,782 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,792 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,544 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,101 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,792 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 | 5,989 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 | 5,928 reads
   Items 1 to 8 of 8   
 
Tags
blogs (1)    
scripting (1)    
sp_executesql (1)    
stored procedures (1)    
structure (1)