Solved

Executing prepared statement in procedure

Posted on 1999-01-19
1
431 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DBSRV50.exe -" windows 95 compatible" checkbox 3 684
SyBase SQL Syntax 5 650
Sybase - How to edit cron schedule for sybase backups 3 861
detecting a database behind a website 3 367
Troubleshooting common task sequence error codes
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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