Jaime
Dec 11, 2020 7:22:21 PM

Procedure

What is the correct syntax to call a procedure within a query. For example:

Select A, B, C, IIF(A = SELECT AA from Procedurename(Par1, par2), 'Found', 'Not_Found') as Flag .

The procedure has three variables  ( return value, Value1, Value2) and the procedure returns is a list of items that is furter filtered by the comparasion to AA. 

so the query results should be:

A,B,C,Found  or

A,B,C,Not_Found

 



Synametrics support engineer
Dec 14, 2020 11:20:05 AM

Procedure

Jaime,

The answer to this question depends upon the type of back-end database you're connecting to. WinSQL sends your queries as-is to the back-end database and it is up to that system to return results.

A more common way of what you're trying to do is to create a VIEW rather than a stored procedure if your end goal is to use it in a FROM clause.

Therefore, please check the documentation of your back-end SQL server to confirm it supports using a Stored Procedure in the FROM clause.

Navigation

Social Media

Powered by 10MinutesWeb.com