chalie001
asked on
dynamic sql
hi is it posible to create dynamic sql to create a select statement
for example i have table with 50 rows i need to contract a select statemnt for all column how can i do that dynamic
for example i have table with 50 rows i need to contract a select statemnt for all column how can i do that dynamic
Have you seen this
hi is it posible to create dynamic sql to create a select statement
Short answer: yes ;-)
BUT: what exactly do you want to do?! you provide little information about your "problem"...
ASKER
i have table employee which got col1.co3,col2 etc until 50 columns
i what to write select for those 50 columns is there a dynamic way i can do that
i what to write select for those 50 columns is there a dynamic way i can do that
Thanks, but this is still insufficient. I have no idea what you want to do?!? Where do you want to create/use/execute that SQL statement?! You should tell us some more ;-)
There are ways to build a SELECT statement dynamically (e.g. via 'execute immediate' or dbms_sql), BUT if we don't know what you're supposed to do, then there can't be an adequate solution...
There are ways to build a SELECT statement dynamically (e.g. via 'execute immediate' or dbms_sql), BUT if we don't know what you're supposed to do, then there can't be an adequate solution...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Whether this is good or not, you gave half of the answer yourself ;-)
Now you may select this value into a variable and do an "execute immediate..." from within PL/SQL for instance...
Now you may select this value into a variable and do an "execute immediate..." from within PL/SQL for instance...
ASKER
correct