May 15, 2011 at 5:34 pm
Hello
I would like to give a rename the Parameter Output header . Currently the procedure output header name is data, i would like that header be named Results. I want to do that without changing the store procedure .
see below what i am doing what the results is null
DECLARE @LoginG as uniqueidentifier = (select l.LoginGUID from login l inner join EmailQueue eq on eqo.OriginatingColumnValue = l.LoginID and eqo.EmailQueue = 100228 ) , @QuickLinkTypeG as uniqueidentifier = '55B6CC66-D43B-4D0E-BA1B-FA167CBC7D86', @LGUID as uniqueidentifier = NULL, @QuickLink as varchar(max)
EXEC [dbo].[usp_QuickLink_Basic] @LoginG,@QuickLinkTypeGUID,@LGUID, @QuickLink OUTPUT SELECT @QuickLink AS 'Results'
Thank you,
May 16, 2011 at 8:37 am
Are you trying to set the presentation value to 'Results'? I don't quite get what you are going for here.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
May 16, 2011 at 8:51 am
This is what happened. The store procedure is returning the value with header name(column) is Link, there is another process that use this value based on the header name so i can't change the name in the SP. to avoid this i was trying to give an alias to the output value. I was able to do it by creating a local table and name the column result than select from that table and it worked fine, but here at work they don't want me use local table. so i am trying to find a way to change the header name (which is a column name that is outputted from the SP) to a different name
May 16, 2011 at 8:59 am
So you are trying to change the name of the parameter that is sent back from a sproc? I can't for the life of me come up with a scenario why you would need to change the name of an output parameter. I also don't think there is any way to change a parameter name as it is being returned.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
May 16, 2011 at 9:00 am
It's not quite clear, perhaps from the formatting, or from the description what you mean. Can you specifically list which column you are outputting and where and how it is being used? And please format your code so it's more readable on multiple lines?
The stored procedure doesn't seem to be outputting a result set from what I see, or is there something else here? If you are using output columns, can you not include a header link when you select the output as a result?
May 16, 2011 at 9:06 am
Reformated code...
DECLARE
@LoginG as uniqueidentifier = (
select
l.LoginGUID
from
login l
inner join EmailQueue eq
on eqo.OriginatingColumnValue = l.LoginID
and eqo.EmailQueue = 100228
)
, @QuickLinkTypeG as uniqueidentifier = '55B6CC66-D43B-4D0E-BA1B-FA167CBC7D86'
, @LGUID as uniqueidentifier = NULL
, @QuickLink as varchar(max)
EXEC [dbo].[usp_QuickLink_Basic] @LoginG , @QuickLinkTypeGUID , @LGUID ,
@QuickLink OUTPUT
SELECT
@QuickLink AS 'Results'
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply