Forum Replies Created

Viewing 11 posts - 16 through 26 (of 26 total)

  • RE: total inside cte

    Thanks you very much Jeff Moden for solving this and keeping the community alive by helping others.

    regards,

  • RE: Help with SQL Query

    rtanda (10/16/2010)


    I'm a newbie, I need help with sql query.

    The requirement is : To get data from table which has column which has values example x=1 or Yes

    Table:

    ID...

  • RE: change sequence of seperated numbers to row inside cte

    thanks alot wayne for your reply.

  • RE: Similar groups placed randomly must be allocated a group number each

    hi coldcoffee just replace sourcetable with @sourcetable

    Declare @ResultTable Table

    (

    ID int identity(1,1),

    [value] int,

    [setnumber] int

    )

    declare @Newvalue int

    declare @OldValue int

    declare @counter int

    set @counter=0

    declare abc cursor

    for

    select value from sourcetable

    open abc

    fetch next from...

  • RE: Return Parent Level entry using cte

    got the reply from other forum.

    declare @id int

    declare @levelid int

    set @id=2;

    set @levelid=2;

    ;with cteloc

    as

    (

    select ID,LocationName,ParentID,LevelID,ID as ParentId2 from locationtable where id=@id

    union all

    select a.Id,a.LocationName,a.ParentID,a.LevelID,cteloc.id from locationtable

    a inner join cteloc...

  • RE: Return Parent Level entry using cte

    hi,

    can some of make this thing concise becouse the same cte is repeated twice i need to check the levelid only, now it accept locationid as parameter.

    select * from...

  • RE: Return Parent Level entry using cte

    thanks alot LutzM the problem is solved . I have one another problem in here how can i parameterized this cte incase i want to pass locationid at any level.

    if...

  • RE: pivot query

    wow thanks alot ... now i am learning the power of cte...

  • RE: pivot query

    one thing more is it possible to add total also at the bottom for each months and quarters , i tried to use union didn't work , do i...

  • RE: pivot query

    thanks a lot both of you for your support , both solution works.

  • RE: pivot query

    hi,

    neither interview nor homework it is just a requirement.

Viewing 11 posts - 16 through 26 (of 26 total)