Showing posts with label john. Show all posts
Showing posts with label john. Show all posts

Monday, February 13, 2012

adding column in resultset from SP

I have a sp: mysp_getstuff
it contains the following:

SELECT Adress,City FROM tblUserData WHERE UserName='john'

as you can see it returns 2 columns.
I also have another SP: mysp_GetNr. This sp returns an integer.

I want to call mysp_getnr from mysp_getstuff and add the result to the 2 columns in a column named 'Number'
So the resultset from mysp_getstuff should be:
Adress, City, Number (in which the number column contains the result from mysp_GetNr)

How can I do that?

Use an OUTPUT Parameter to get the value from mysp_getnr.

Declare @.num int

EXEC mysp_getnr @.params... @.num OUTPUT

Then, in your mysp_getstuff you can either return @.num as its OUTPUT param or along with the result set.

SELECT Adress,City,Number=@.num FROM tblUserData WHERE UserName='john'.

Sunday, February 12, 2012

adding attribute to an existing dimension

how would i go about adding a attribute to an existing dimension? the dimension in question is the time dimension.

thanks.

John

In SSAS2005 you drag the column from the right window(the table from the data source view) to the window to the left. This is done in the dimension editor in BI-Developer Studio.

HTH

Thomas Ivarsson