Top "Dynamic-sql" questions

Dynamic SQL is a technique using SQL (Structured Query Language) whose main difference from traditional SQL is that Dynamic SQL allows to build SQL statements dynamically at runtime, which eases the automatic generation and execution of program statements.

exec sp_executesql @sql and exec (@sql) SQL Server

A Dynamic SQL query from lobodava is: declare @sql nvarchar(4000) = N';with cteColumnts (ORDINAL_POSITION, COLUMN_NAME) as ( select ORDINAL_…

sql sql-server tsql sql-server-2008 dynamic-sql
How to use Order By in a stored procedure without using dynamic SQL

I've the following MS SQL stored procedure. I need to sort the results without using dynamic SQL and sp_executesql …

sql-server tsql sql-order-by dynamic-sql
Update record of a cursor where the table name is a parameter

I am adjusting some PL/pgSQL code so my refcursor can take the table name as parameter. Therefore I changed …

postgresql cursor sql-update plpgsql dynamic-sql
TSQL -- Inserting Dates Into Dynamic SQL

Consider the following TSQL: SET @WhereClause1 = 'where a.Date > ' + @InvoiceDate I get a date/string conversion error. @InvoiceDate …

tsql datetime date dynamic-sql
pl/sql - to_date not working with execute immediate parameter

i wanna be able to execute my below proc like so: exec procname('29-JAN-2011'); proc code is: PROCEDURE …

sql oracle plsql dynamic-sql ora-00904
How to use variables in "EXECUTE format()" in plpgsql

I want to update a column in table stats with the specific column being a parameter, then return the updated …

sql postgresql plpgsql dynamic-sql stored-functions
MySQL join tables where table name is a field of another table

I have 5 tables. One primary and 4 additional (they have different columns). objects obj_mobiles obj_tablets obj_computers Here is …

mysql dynamic-sql
How to dynamically order by certain entity properties in Entity Framework 7 (Core)

I have a project where the front-end JavaScript specifies a list of columns to order by. Then in the back-end …

linq sql-order-by asp.net-core dynamic-sql entity-framework-core
Dynamic SELECT INTO in PL/pgSQL function

How can I write a dynamic SELECT INTO query inside a PL/pgSQL function in Postgres? Say I have a …

postgresql variable-assignment plpgsql dynamic-sql stored-functions
Dynamic SQL Comma-Delimited Value Query

[Update: Using SQL Server 2005] Hi, what I want to do is query my stored procedure with a comma-delimited list of …

sql dynamic-sql delimiter delimited