Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)

  • RE: is it possible to nest if statements in stored proc?

    Yes,you can nest if statements in storedprocedure

    example

    create procedure dbo.exampleSp

    (@RefreshFactweekly int,@RefreshFactMonthly int)

    WITH RECOMPILE

    as

    begin

    declare @CurrYr int

    select @curryr=FiscalyearId from Salesdate  where SDate=getdate()

    if  @RefreshFactweekly = 1

     begin

      if @RefreshFactMonthly = 1

      begin

     Insert prodsales

     Select d.id from products...

  • RE: weighted average calculation

    hi,

    When you calculate for weighted average as

     sum({{[Measures].[Takers]}*{[Measures].[Score]}}) /

    count({[Measures].[Takers]})

    Even if syntax is correct,it will give...

  • RE: Passing dynamic variable in a DTS

    According to me you can not pass parameter in inline queries for DTS SQL task.

    Generally the parameters is passed in query using "?" then setting input parameter from global variable.

    example  

    Create...

  • RE: DTS error - System cannot find the path specified

    Whenever you deploy your dts package to another machine you do have to give location of .ini file path if the path is not mapped properly.

    One more way to set...

  • RE: Loop thru a String, Like this code in visual basic

    Hi,

    Following script will give you same result as above VB code,without using cursor.

    Declare @Found varchar(100),

            @Results varchar(100),

            @STR varchar(100),

            @length int,

            @leng int

           set @STR =...

  • RE: Function Avg() Question

    Hi,

    You have to specify the level of the time dimension, Find below the example.

    If the lowest level is week.If Lowest level is day the change...

  • RE: Function Avg() Question

    sum(filter([time].currentmember,(([measures].[Duration])>0)))

    /count(filter([time].currentmember,(([measures].[Duration])>0)))

     

    I hope this will help you

Viewing 7 posts - 16 through 22 (of 22 total)