Forum Replies Created

Viewing 15 posts - 676 through 690 (of 1,114 total)

  • RE: sum(),Cummulative addition,Case statement

    Jeff,

    I have tested the below script.

    create table #test

    (

    Sample Bit

    )

    insert into #test

    select 1

    union all

    select 0

    union all

    select 1

    union all

    select 0

    ...

    karthik

  • RE: Tally Table

    Second one is definitely a triangular join... you are trying to return more than one row for each row in #Result,

    aren't you?

    yes.

    If so, how else would you do...

    karthik

  • RE: sum(),Cummulative addition,Case statement

    You've seen me do test tables like this before... next time, you can "explain it with example".

    Sure.

    karthik

  • RE: Get First row value

    So as your people said , table should be created with clustered index.

    But unfortunately table doesn't have clustered index.

    what is the solution to solve this problem ?

    i.e do i...

    karthik

  • RE: Tally Table

    Can you explain me about Hidden RBAR or Triangular Join ? I have studied your article 'Triangular Join'. After that lot of doubts arises. Its like putting stone in a...

    karthik

  • RE: SqlServer Elapsed Time

    The way you use it - Yes, it can't use the index

    This is OK

    where col = @f+'g'

    But this is not

    where col+'g' = 'abcdefg'

    If you use a function on a...

    karthik

  • RE: Previous Row + Current Row calculation

    Thanks a lot Lynn Patel !

    but realize that @FinalData will not reset to 1 when EmpNo changes

    No, It has to reset for each employee. Also it has to rest for...

    karthik

  • RE: Tally Table + Running Total

    As you said if i subtract it from 13 it will give correct result. But assume if any month is missed in the sequence,out query will give wrong sequence. How...

    karthik

  • RE: sum(),Cummulative addition,Case statement

    Thanks Jeff for leading me in the right direction to lesson me about SET BASED concept and giving new ideas to me.Also my Thanks to rbarryyoung and Christopher for giving...

    karthik

  • RE: Previous Row + Current Row calculation

    Hi Christopher,

    Here time is 9:00 PM ,So i have planned to leave. Please do post your reply.

    karthik

  • RE: Previous Row + Current Row calculation

    Have you tried using a table variable or derived table?

    will it work out ?

    karthik

  • RE: Previous Row + Current Row calculation

    Christoper,

    sorry for not including, i am using Sql2000.

    karthik

  • RE: Previous Row + Current Row calculation

    Christoper,

    sorry for not including, i am using Sql2000.

    karthik

  • RE: Previous Row + Current Row calculation

    Sorry! A little modification in the procedure.

    Create procedure p1

    (

    @dt datetime,

    @eno int

    )

    as

    begin

    Declare @eno int,@date datetime,@pdata decimal(5,8),@gdata decimal(5,8)

    Declare @FinalData decimal(5,8), @FinalData1 decimal(5,8)

    set @FinalData = 1,@FinalData1 = 1

    Declare cursor c1

    for select EmpNo,PerDate,PerformanceData,GrossData

    from emp

    for...

    karthik

  • RE: Previous Row + Current Row calculation

    I want to update the below blank column by using the mentioned formula posted earlier.

    EmpNo PerDate PerformanceData GrossData FinalData

    1 ...

    karthik

Viewing 15 posts - 676 through 690 (of 1,114 total)