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.

Format specifier for integer variables in format() for EXECUTE?

CREATE OR REPLACE FUNCTION getParentLtree(parent_id bigint, tbl_name varchar) RETURNS ltree AS $BODY$ DECLARE parent_ltree ltree; BEGIN …

postgresql plpgsql dynamic-sql string-concatenation
Oracle - using bind variable in LIKE clause of dynamic cursor

I am using dynamic cursor for fetching data. Query that is being executed looks similar to: query := 'SELECT column1, column2 …

oracle cursor dynamic-sql bind-variables
How to pass a table variable using sp_executesql

I'm trying to create a table using sp_executesql but I keep getting an error that says "Incorrect syntax near …

sql sql-server dynamic-sql sp-executesql
What is a dynamic SQL query, and when would I want to use one?

What is a dynamic SQL query, and when would I want to use one? I'm using SQL Server 2005.

sql sql-server-2005 dynamic-sql
Mybatis If statements using include properties

I'm trying to create a generic SQL include in Mybatis that will apply a comparator given a particular value. The …

java postgresql mybatis dynamic-sql ognl
Put $$ in dollar-quoted string in PostgreSQL

I have a function in Postgres: CREATE OR REPLACE FUNCTION upsert(sql_insert text, sql_update text) RETURNS integer AS $…

postgresql syntax escaping dynamic-sql quoting
Prepend table name to each column in a result set in SQL? (Postgres specifically)

How can I get the label of each column in a result set to prepend the name if its table? …

sql postgresql dynamic-sql identifier sql-view
List row count of each view and table

I have a database named test which has 2 views and 2 tables in schema dbo like this: I want to create …

sql-server dynamic-sql information-schema
Left join with dynamic table name derived from column

I am new in PostgreSQL and I wonder if it's possible to use number from table tbc as part of …

sql postgresql dynamic dynamic-sql tablename
Simple dynamic TSQL query syntax

This may be an easy answer but I've been staring at it for too long... I have the following query …

sql sql-server tsql sql-server-2008-r2 dynamic-sql