Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3347

Re: Datawindow with SQL SubSelect? PB 12.5

$
0
0

I appreciate everyone sticking with me on this.

 

Aart, I changed the last line as you suggested.

 

Arnd, I hate to say this, but I did not know how to test the sp.  I googled it and it was quite easy to test and it helpfully pointed out some errors that I fixed.

 

I now know the stored procedure works.  Here are the nice automatically generated sql statements that SQL Management Studio created for me:

 

USE [LIMO]

GO

 

 

DECLARE @return_value int,

  @rate_rank int

 

 

EXEC @return_value = [dbo].[ft_sp_RankAffiliateRate5]

  @sp_id = N'F10968',

  @a_identity = 23864,

  @b_identity = 4018,

  @vehicle_type = 1,

  @rate_rank = @rate_rank OUTPUT

 

 

SELECT @rate_rank as N'@rate_rank'

 

 

SELECT 'Return Value' = @return_value

 

 

GO

 

I know some of you have suggested replacing the datawindow syntax with one overarching sql statement that includes the rank_dense clause as a subselect.  I will do that if it appears that there are performance problems.

 

For the moment, I am going to focus on getting it running from a PB script and see if there is a performance problem.

 

So right now, I am thinking maybe I can just execute the sql as shown above and get @return_value.

 

Thanks again everyone!!!!!

 

Paul


Viewing all articles
Browse latest Browse all 3347

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>