Inserting the results of a stored procedure into a table
There’s an extremely useful feature in T-SQL that let’s you insert a rowset from a stored procedure or function directly into a table or (from SQL Server 2005 onwards) a table variable. Where this...
View ArticleFlexible Search using Stored Procedures: varying the WHERE clause at run-time
Stored Procedures offer a number of advantages when developing databases, perhaps the chief among them being performance and security. I am loathe to lose these advantages but because they are...
View ArticleIntroduction to SQL Injection
I wrote a post recently about creating flexible WHERE clauses in stored procedures to support, amongst other things, requirements for flexible search functionality without resorting to building and...
View ArticleHow and why to use LEFT JOINs in SQL statements
LEF T JOINs are something I’ve been using in SQL statements for literally years without thinking much about it but a few conversations recently have made me realize that with the rise of ORMs, a lot of...
View ArticleUsing SQL and LEFT JOINs to find missing data
It’s not unusual when working with data-driven applications to be asked to produce ad-hoc exception reoprst of the type: there should a at least one row in TableB for each row in TableA – can you tell...
View Article
More Pages to Explore .....