Using Dynamic SQL
Today Steve notes that Dynamic SQL can be helpful, but it's a technique you should understand well before you start using it.
2021-03-02
232 reads
Today Steve notes that Dynamic SQL can be helpful, but it's a technique you should understand well before you start using it.
2021-03-02
232 reads
In some applications having hard coded SQL statements is not appealing, because of the dynamic nature of the queries being issued against the database server. This is where dynamically building SQL statements can be useful.
2021-02-15
Learn some of the basics of using Dynamic SQL in a short series of videos.
2019-08-12
8,534 reads
2019-04-29
17,271 reads
In this article, we will see of a quick way to load CSV files from a directory on your computer.
2018-09-18
8,504 reads
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.
2018-07-24
4,817 reads
Based on a real fact, this article demonstrates how a bad use of sp_executesql can lead to unpleasant surprises
2018-04-30
1,784 reads
Dynamic SQL is essentially normal SQL written in such a way that you end up with a “customised” SQL script at run-time.
2018-02-12
4,096 reads
2017-08-25
976 reads
In some applications having hard coded SQL statements is not appealing, because of the dynamic nature of the queries being issued against the database server. Because of this sometimes there is a need to dynamically create a SQL statement on the fly and then run that command. This can be done quite simply from the application perspective where the statement is built on the fly whether you are using ASP.NET, ColdFusion or any other programming language. But how do you do this from within a SQL Server stored procedure?
2016-05-03
5,701 reads
By Steve Jones
I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter...
This post comes off the back of my last, where I looked at issues...
By Vinay Thakur
As this is an Artificial Intelligence (AI) World, things are changing. We can see that...
The MediCopia Bedside Mobile Specimen Labeling Solution uses existing barcoded patient wristbands, Zebra ZQ610...
hi, i spent some time today in an existing pkg replumbing 5 flat file...
Still trying to figure out options for automating the export the result of a...
What does this code return?
SELECT ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2011' AND soh.OrderDate < '01/01/2012') AS OrdersIn2000 , ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2012' AND soh.OrderDate < '01/01/2013') AS OrdersIn2001 , ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2013' AND soh.OrderDate < '01/01/2014') AS OrdersIn2002; GOSee possible answers