Dynamic execution question 
Author Message
 Dynamic execution question

Hi,

I have just started using System XI after using MS-SQL 6.x for the last
year or so. Under MS-SQL there is a feature that allows you to execute a
string in a Stored procedure. If I remember the syntax correctly it would
look like the following code fragment:



I have looked through the sybooks for System XI and can't find a similar
feature. Is there a way to do this?
Thanks in advance for your help.

Phil Williams.



Mon, 24 Apr 2000 03:00:00 GMT
 Dynamic execution question

Quote:

> Hi,

> I have just started using System XI after using MS-SQL 6.x for the last
> year or so. Under MS-SQL there is a feature that allows you to execute a
> string in a Stored procedure. If I remember the syntax correctly it would
> look like the following code fragment:



> I have looked through the sybooks for System XI and can't find a similar
> feature. Is there a way to do this?
> Thanks in advance for your help.

> Phil Williams.

Currently Sybase does not support dynamic execution of SQL, you need to
do it through a client app.  There is a slight exception to this though,
you can execute stored procedures using variables.  For example:




Kyle Hachey,
Platinum technology



Mon, 24 Apr 2000 03:00:00 GMT
 Dynamic execution question

Kyle>

Quote:

>> Hi,

>> I have just started using System XI after using MS-SQL 6.x for the last
>> year or so. Under MS-SQL there is a feature that allows you to execute a
>> string in a Stored procedure. If I remember the syntax correctly it would
>> look like the following code fragment:



>> I have looked through the sybooks for System XI and can't find a similar
>> feature. Is there a way to do this?
>> Thanks in advance for your help.

>> Phil Williams.

Kyle>
Kyle> Currently Sybase does not support dynamic execution of SQL, you need to
Kyle> do it through a client app.  There is a slight exception to this though,
Kyle> you can execute stored procedures using variables.  For example:
Kyle>



Kyle>

... that client app may simply be a shell script:

======
#!/bin/sh

isql ... <<EOF | isql ...
use my_db
go
select 'update statistics ' + name + char(10) + 'go'
from sysobjects where type='U'
go
EOF
======
ya get the gist...
--
Pablo Sanchez              | Ph # (650) 933.3812          Fax # (650) 933.2821

-------------------------------------------------------------------------------
I am accountable for my actions.   http://reality.sgi.com/pablo [ /Sybase_FAQ ]



Mon, 24 Apr 2000 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. DTS transfer question on dynamic execution of DTS package

2. more on security issues - permissions on dynamic sql statement execution

3. Dynamic execution of sprocs in Tsql?

4. Execution of a dynamic built select

5. dynamic execution with output parameters, is it possible?

6. Dynamic SQL, Coalesce, Stored Procs execution plans and cost

7. more on security issues - permissions on dynamic sql statement execution

8. Dynamic query execution in user defined functions

9. Using Temp Tables with Dynamic Execution

10. more on security issues - permissions on dynamic sql statement execution

11. Dynamic SQL Execution

12. Dynamic Stored Procedure Execution problem


 
Powered by phpBB® Forum Software