Forum Replies Created

Viewing 15 posts - 4,501 through 4,515 (of 15,381 total)

  • RE: output identity values

    Eirikur Eiriksson (6/11/2014)


    Grin aside, the last comment is uncalled for, it will not earn you any respect.

    I don't think Joe is all that worried about earning respect. Might be worth...

  • RE: Today's Random Word!

    crookj (6/11/2014)


    Ed Wagner (6/11/2014)


    Kurt W. Zimmerman (6/11/2014)


    Ed Wagner (6/11/2014)


    JAZZ Master (6/11/2014)


    Sean Lange (6/11/2014)


    Ed Wagner (6/11/2014)


    Sean Lange (6/11/2014)


    Ed Wagner (6/11/2014)


    crookj (6/11/2014)


    Sean Lange (6/11/2014)


    Ed Wagner (6/11/2014)


    Revenant (6/11/2014)


    eccentricDBA (6/10/2014)


    TomThomson (6/10/2014)


    sing4you (6/10/2014)


    Stuart Davies (6/10/2014)


    Sean...

  • RE: refomat column data into row data

    Agreed. UNPIVOT would be a better choice here.

  • RE: Advise on how to add counts to a query

    This works for your sample data.

    select s.Closing as ClosingDate

    , p.Name as Project

    , s.Amount as TotalSales

    , sum(case TaskCode when 'Task1' then 1 end) as Task1

    , sum(case TaskCode when 'Task2' then 1...

  • RE: script to select certain fields

    ChrisM@Work (6/11/2014)


    Sean Lange (6/11/2014)


    SQLSteve (6/11/2014)


    Sean, the query only posted 1 entry back to me from the duplicate. Chris' posted both enrties, so I can now see all of the entries...

  • RE: Get Month # and year

    sharonsql2013 (6/11/2014)


    Sure will do.

    Thanks a lot.Made my day! Saved me a lot of work.

    You're welcome. Glad that worked for you. 😀

  • RE: script to select certain fields

    SQLSteve (6/11/2014)


    Sean, the query only posted 1 entry back to me from the duplicate. Chris' posted both enrties, so I can now see all of the entries rather than just...

  • RE: Get Month # and year

    sharonsql2013 (6/11/2014)


    select datepart(mm, cast( Month_Year as datetime)) gives conversion error too

    Of course it won't convert. "Apr-2014" is not a valid date. This kind of stuff would be SO much easier...

  • RE: refomat column data into row data

    Your sample output doesn't seem to match your sample data but I think you want something like this.

    select SalesDate, 'apples' as FruitSales, AppleSales

    from #fruitSales

    union all

    select SalesDate, 'oranges', OrangeSales

    from #fruitSales

    order by...

  • RE: How to get a pivot statement without aggregate

    Hi and welcome to the forums. In order to help we will need a few things:

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in the form...

  • RE: Advise on how to add counts to a query

    Hi and welcome to the forums. In order to help we will need a few things:

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in the form...

  • RE: Get Month # and year

    sharonsql2013 (6/11/2014)


    My table has the field called MOnth_year which is "Apr-2014" ,"Aug-2013"

    For query purposes , i need to get only month numbers and year as seperate columns

    Like Apr = 4

    How...

  • RE: Today's Random Word!

    Ed Wagner (6/11/2014)


    Sean Lange (6/11/2014)


    Ed Wagner (6/11/2014)


    crookj (6/11/2014)


    Sean Lange (6/11/2014)


    Ed Wagner (6/11/2014)


    Revenant (6/11/2014)


    eccentricDBA (6/10/2014)


    TomThomson (6/10/2014)


    sing4you (6/10/2014)


    Stuart Davies (6/10/2014)


    Sean Lange (6/10/2014)


    Ed Wagner (6/10/2014)


    Sean Lange (6/10/2014)


    JAZZ Master (6/10/2014)


    Boots

    y Collins

    Drink

    Please!!!

    Thanks

    funkedelic

    cool

    bodacious

    90's

    80's Music

    totally

    Rad

    Righteous

    Bitchin'

    Hair

    BIG

  • RE: script to select certain fields

    SQLSteve (6/11/2014)


    I need to write a query to select some fields from a table, where one of the fields is dublicated. Data is disjointed and one of the entries has...

  • RE: Today's Random Word!

    Ed Wagner (6/11/2014)


    crookj (6/11/2014)


    Sean Lange (6/11/2014)


    Ed Wagner (6/11/2014)


    Revenant (6/11/2014)


    eccentricDBA (6/10/2014)


    TomThomson (6/10/2014)


    sing4you (6/10/2014)


    Stuart Davies (6/10/2014)


    Sean Lange (6/10/2014)


    Ed Wagner (6/10/2014)


    Sean Lange (6/10/2014)


    JAZZ Master (6/10/2014)


    Boots

    y Collins

    Drink

    Please!!!

    Thanks

    funkedelic

    cool

    bodacious

    90's

    80's Music

    totally

    Rad

    Righteous

    Bitchin'

Viewing 15 posts - 4,501 through 4,515 (of 15,381 total)