Focal Point
calling param in SQL EX

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4647026216

November 09, 2011, 12:55 PM
getit
calling param in SQL EX
Hi,
I have a stored procedure with

TEST @var1= 1, @var2= 0,@var3 = 'a';

I want to run it thru webfocus.

SQL MSS
EX TEST 1,0,'a'


Is there a way to specify only 2 variables,
something like, but this is not working.

SQL MSS
EX TEST var1= 1,var3 = 'a'

What I am looking for is to pass variables using their SQL Name.

Any help is appreciated.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 09, 2011, 01:01 PM
njsden
quote:
EX TEST var1= 1,var3 = 'a'

Is that supported by the Adapter for MS SQL Server? What does the documentation say?

Check: DN# 4500931.1209 - Adapter Administration for UNIX, Windows, ... 7.6.11



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
November 09, 2011, 03:32 PM
getit
I looked in the manual and there is only documentation for positional parameters i.e.,it has to be passed in the order of var1, var2 ,etc without specifying the variable name.
For Ex:
SQL MSS
EX TEST 1,0,'a'
But our requirement is that these stored procedures change and new variables might get added in the middle.., so we need to reference them using their name, so that we do not have to change the code.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 09, 2011, 05:51 PM
getit
Can anyone suggest a solution for this.?


App Studio Version 8202
windows Platform
SQL Server 2008/2012
November 10, 2011, 10:52 AM
njsden
quote:
,it has to be passed in the order of var1, var2 ,etc without specifying the variable name.


Sadly there's your answer from a WF rule standpoint.

If you really want to pass just 2 or 3 parameters to your 10 parameter stored procedure, you may need to create a "helper" or wrapper stored procedure that *always* receives the 2 or 3 parameters you would pass from WebFOCUS. From within that procedure, you can then call your other stored procedure specifying only the parameters you want by name (not by position).

Of course, that means that if you envision having different WebFOCUS "ways" to call your stored procedure, then you'll need as many wrappers. Not optimal but it's the only way I can see to not be limited by the WebFOCUS syntax.

Let's hear from others suggesting something more workable and maintainable.

This message has been edited. Last edited by: njsden,



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
November 10, 2011, 11:32 AM
getit
Thank you njsden for your suggestion. Does anyone have any more ideas?


App Studio Version 8202
windows Platform
SQL Server 2008/2012