Solved

Executing prepared statement in procedure

Posted on 1999-01-19
1
421 Views
Last Modified: 2010-05-18
Is there any way to execute a prepared statement in a stored procedure in Sybase 11?  In Microsoft SQL Server, you can do the following in a procedure:

  select @stmt = "select custname from customer"
  execute (@stmt)

I believe that you can do the same in SQL Anywhere, although it might be "execute immediate" instead of just "execute".  Can this be done in Sybase 11?
0
Comment
Question by:jsullivan
1 Comment
 
LVL 10

Accepted Solution

by:
bret earned 150 total points
ID: 1098559
Not in 11.0.x.  In 11.5.x and above, there is a stored procedure called sp_remotesql that can be used to do this.  Do a powersearch for "sp_remotesql" at http://www.dejanews.com to find a full description of how to do this.

A more direct "execute immediate" functionality is planned for the next release (12.0), due out around the middle of the year.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now