Within my function depends on value forming a SQL statement
As Example
set
@SqlString = 'select ' + @ColumnName + ' from ' + @tableName + ' where ' + @whereCondHow can i execute this Statement. within function
Thanks in advance
RK
set
@SqlString = 'select ' + @ColumnName + ' from ' + @tableName + ' where ' + @whereCond
Executin SQL statement from variable in functions
Pommie Phil
is there a way i can a open cursor with dynamic sql.
Our requirement is we have set of related tables with different data but all integer columns
We are trying to create few statistical functions/procs So user can pass Table name and column name and optionally any conditions, so that my function/procs returns results.
Bogey1
jhangeirakhtar300
Hernan93
I can change function to stored procedure within storedprocedure how can i execute a dynamic SQL
My requirement is to open cursor with dynamic SQL.
table name, columns list and conditions are depends on user parameters
Alain Vezina