how to execute a query that is result of another query in sybase -


i trying create procedure i'm passing parameter. based on parameter select field table select query(text datatype). want retrieve data of select query.

sql query in table text data type , sybase doesn't allow create text local variables.

table1

filter_criteria  db_query incremental      select a,b,c table2 <filter_condition1> complete         select a,b,c table2 <filter_condition2> 

table2

a   b   c 11  12  13 12  13  14 

if pass ‘incremental’ proc return 11,12,13 , on..

use execute-immediate. i.e. compose sql query dynamically in varchar variable , execute 'execute(@your_varchar_variable)'


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -