Forum Replies Created

Viewing 15 posts - 31 through 45 (of 76 total)

  • RE: Roll Up Function

    Thanks for the Reply.,

    But i want to Show Workid,Project_name as well in the query

  • RE: SQL Server 2008 Query Optimizing (alternate Method)

    Thanks for the reply,

    A subquery returns result very fast compare to joins so...

    There are 1 lakh + record in the database object table

    Is it Possilbe to Retrieve record in the...

  • RE: Case With Group by Row Values into Column

    Hey Chris

    I got the Solution

    I removed Group by item_name in the Query

    thankz For the reply..

    I have one more issue in "catch All" queries

    Without declaring Local Variable to check in the...

  • RE: Case With Group by Row Values into Column

    Hey

    My Metric Values returning two times Lyk

    IsNUll(Sum(Case When Datepart(year,mdate)= 2011 and mt.item_name = 'Hard Savings' then m.value End),0) as HardSavingFY11,

    IsNull(Sum(Case When Datepart(year,mdate)= 2012 and...

  • RE: Case With Group by Row Values into Column

    If i Execute the above query

    I'm getting Result set as

    Msg 2714, Level 16, State 6, Line 8

    There is already an object named '#View_Tag' in the database.

  • RE: Case With Group by Row Values into Column

    Hey Guys

    I want to add column value and show in the next column.

    Like (HardSavingFY10 + HardSavingFY11)

    And show it in the another value for each rows

    Is there any possibilities..??? If...

  • RE: Case With Group by Row Values into Column

    Yup results are Correct

    but Honestly not hapy with my queryy

    Plz do let me know if there is any other option so tht query runs fast

  • RE: Case With Group by Row Values into Column

    Actually This is My Query. In this Query , How to sum

    Declare @portfolioId Varchar(8000),

    @ParentWorkids Varchar(50)

    Set @portfolioId = '1800m380000iot22g3t0000000_1800m380000io7c5nr50000000'

    set @ParentWorkids = '1801a2g0000ih0vl2abg000000'

    SelectTOP 20 vh.parent_work_id As ParentWorkId,vh.parent_name As ParentName,vh.child_work_id As ChildWorkId,

    vh.child_name As...

  • RE: Case With Group by Row Values into Column

    Hey Guys

    If I want to make Sum Of this HardSAvingFY11 And HardSavingFY12 in the Query ?? Is there any option for this?

  • RE: Case With Group by Row Values into Column

    This is the Solution

    Select

    Sum(Case When Datepart(year,mdate)= 2011 and mt.item_name = 'Hard Savings' then m.value End) as HardSavingFY10,

    Sum(Case When Datepart(year,mdate)= 2012 and mt.item_name = 'Hard Savings' ...

  • RE: Case With Group by Row Values into Column

    Thanks Buddy...

    I got the Solution

  • RE: Case Condition in the Where Clause

    Thanks

    Its Working fine Now...

    I used below syntax

    Declare @portfolioName Varchar(8000),

    @ParentWorkids Varchar(50)

    Set @portfolioName = 'CI Projects'

    set @ParentWorkids = '1801a2g0000ih0vl2abg000000'

    (vp.portfolio_name = @portfolioName Or @portfolioName Is nuLL)

    And (vh.parent_work_id = @ParentWorkids Or @ParentWorkids...

  • RE: Case Condition in the Where Clause

    It is in the Stored Procedure Way But i want the result in the Query based In Where Condition

  • RE: Case Condition in the Where Clause

    Yeah Something Like the

    This is First Option:

    Select m.ids,m.name,m.ownerId,m.baselinetime,m2.processId,m2.PortfolioName

    From Mytabe M Join Mytable2 m2 On m.ids = '1800m380000ioet75tq0000000'

    and m2.portfolioname = 'CI Project'

    This is second Option:

    When User Donts Pass...

  • RE: Case Condition in the Where Clause

    Thanks For the Reply...

    1) The User can pass only Ids Or User can pass only Portfolio name

    2) When he pass portfolio name and dont pass Ids then ids take...

Viewing 15 posts - 31 through 45 (of 76 total)