Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Passing procedure parameters in remote exec immediate

2 views
Skip to first unread message

Greg

unread,
May 24, 2002, 11:04:59 AM5/24/02
to
Hi,
I am trying to get the syntax right in using the execute immediate
feature in ASE 12.0. We recently migrated from 11.5 and I need to
convert a bunch of sp_remotesql calls within procedures.

The problem I am having is getting the syntax right so I can pass a
parameter along with the procedure call.

I have tried this:
SELECT @year = 2002
SELECT @remoteProc = "<server>.<database>.dbo.<procedure> @parm=" +
CONVERT(CHAR(4),@year)
EXEC @procStatus = @remoteProc

. . . and I receive the message "<procedure> @year=2002 not a valid
identifier"

I have tried various formats for the procedure parameter, using the
@year= and passing it without. How do I pass a parameter in an
execute immediate remote procedure call?

Sybase documentation is very sparse in this area. Thanks for any help
you can provide.

--Greg

0 new messages