Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a Procedure from a view

Status
Not open for further replies.

WizZerD

Programmer
Jun 8, 2004
8
SE
Now my next problem..

I have made this simple Procedure & stored it.
PROCEDURE: GetAnmarkning
Parameters
Receive String: sAnmarkning
Local Variables
String: sSQL
Actions
Set sSQL = 'select ANMARKNING from UPPSKICKSRAD where BESTID = :sAnmarkning into :sAnmarkning'
Call SqlImmediate(sSQL);

Now I want to call the procedure in my view. Can I just add:
EXECUTE GetAnmarkning('1234')
in the select statement ?

I have tried, but get:
Error: 00134 SQL CNO ERROR.SQL NOT FOUND LOOKING UP ERROR 05041

I can't find any examples of how to do this.
Any help ?

/Nigel
 
Maybe I need to clarify myself.

I need to call a procedure from a select statement, and ultimately from a view..

For example

SELECT UserID, NAME, GetAddress(UserID) FROM CONTACTS

Where GetAddress() is a Procedure that returns an address string for the UserID.

Can anyone help ?

/Nigel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top