[posted and mailed, please reply in public]
Humberto Zamarron (hu***************@tycoelectronics.com) writes:
I am trying to fill a cursor with the results of a Stored
Procedured, but SQL give me an syntax error message , does any one can
give me some help
I am using SQL Server, this is the first lines of my code
DECLARE FRates_Cursor CURSOR FOR
exec GET_FJRs_Eng 'all'
OPEN FRates_Cursor
if I run just the exec GET_FJRs_Eng 'all' line it give me the data
results I am trying to put into the cursor, what that means is the
stored is working fine
Well, SQL Server permits you to pass a cursor variable from a stored
procedure to another. It sounds as if this is something you could have
use for here. Please, refer to Books Online for details. And don't
ask *me* about it, because I have never used the feature, and I guess
that I never will.
Another possibility is to get the data into a temp table, and work
from there. For discussion on this, see an article on my web site:
http://www.algonet.se/~sommar/share_data.html.
--
Erland Sommarskog, SQL Server MVP,
so****@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp