FAQ Database Discussion Community


Execute Immediate bind variable

oracle,function,plsql,dynamicquery,bind-variables
I have the following function that calculates content of the table but when I pass any param it throws: EXEC DBMS_OUTPUT.PUT_LINE(get_size('employees')) Error report - ORA-00903: invalid table name ORA-06512: at "HR.GET_SIZE", line 5 ORA-06512: at line 1 00903. 00000 - "invalid table name" Function CREATE OR REPLACE FUNCTION get_size(v_table_name IN...

SSIS Dynamic Query

sql,ssis,dynamicquery
I am trying to execute the dynamic query in SSIS. When I try the following statement EXECUTE(@dynamicquery) It throws error and suggests to use WITH RESULT SETS But in my case the result schema also dynamic EXECUTE(@query) WITH RESULT SETS ((@resultsschema)); And this is not correct syntax. Is there any...

Can I chain a variable number of query scopes using Laravel 5

laravel-5,dynamicquery
My users need to be able to query the database with up 5 different parameters. I think the best way to handle this is with query scopes. Then just chain together the query scopes. But I cannot figure out how to do this based on an unknown number (0-5) of...

dynamic search with django orm

python,django,orm,dynamicquery
Using django, I want to dynamically search for text across multiple fields. I have a list of fields to search across as well as the text to search against. I also have an initial queryset to query against. Something along these lines: def dynamic_search(queryset): search_fields = ["search_field1", "search_field2", "search_field3"] search_text...