About 19,400 results
Open links in new tab
  1. sql - Most efficient way to run an encapsulated query - Stack Overflow

    Jan 1, 2014 · What's the most efficient way to run a query encapsulated in another? 1. Querying inside a query: id_user. foo in (select foo from table2 where dt_signin > '2014-01-01 00:00') 2. By using a temporary table: foo. dt_signin > '2014-01-01 00:00' and then querying the temporary table. id_user. on t1.foo = tmp.foo.

  2. SQL Stored Procedures – Encapsulate and Reuse SQL Logic

    Encapsulation: Stored procedures allow you to group related SQL statements together, making your code more organized and easier to understand. This is especially useful when you have complex queries or calculations that you need to perform repeatedly.

  3. How to encapsulate Between statement in SQL server

    May 18, 2016 · How to encapsulate Between statement in SQL server. I have a lot of code to refactor that has long list of where clauses with the same Between statement that have magic numbers and I want to refactor it. It is possible to encapsulate the BETWEEN.

  4. sql server 2005 - Encapsulating Logic in SQL - Stack Overflow

    Sep 23, 2011 · I was wondering what the best practice for encapsulating stored procedure logic using a set-based SQL technique. For example, I have a product entry application that I am developing. While attempting to limit code duplication, I created a stored procedure called AddItem which creates a new product in the product tables.

  5. How to encapsulate code as a new stored procedure, a

    Encapsulating T-SQL code as a database object makes that code easier to reuse. The Encapsulate code as feature offers creating a new stored procedure, a view, a scalar inline function, or a table inline function from any valid T-SQL code block.

  6. Encapsulating SQL as a new stored procedure - SQL Prompt 6

    Feb 11, 2013 · With SQL Prompt, you can create a new stored procedure from any block of valid SQL. To encapsulate SQL as a new stored procedure: Open the SQL script you want to encapsulate in a query window. Select the section of the script you …

  7. Mastering Stored Procedures and Functions in SQL - Medium

    Apr 28, 2023 · Explain the syntax for building stored procedures and provide examples of various kinds, including parameterized queries, transactions, and straightforward select statements.

  8. Is there a database programming language with encapsulation to …

    SQL actually has encapsulation built into the language, specifically in the part you're talking about, for preventing injection. The basic idea is, if you're escaping your SQL queries as you build them, you're doing it wrong.

  9. sql server - Is it possible to encapsulate sql-select result? - Stack ...

    My question is how to achieve in SQL something like that: let queryResult = (select e.lastName as Name, count(o.orderid) as numOrd from Employees e join Orders o on e.employeeid=o.employeeid group by e.lastName)

  10. Mastering SQL Packages: Encapsulating Program Units for Efficient ...

    Sep 3, 2024 · Discover how to effectively encapsulate program units in SQL using the SQL Package feature. Improve organization and maintainability of your code.

Refresh