Forum Replies Created

Viewing 15 posts - 3,841 through 3,855 (of 15,381 total)

  • RE: How to update this?

    Still not 100% sure what you want but I am pretty sure you are looking for something like this.

    update t

    set ownerid = d.id

    from timeaccountmovement t

    join dutyrostershift d on d.orig_id =...

  • RE: Trying to get results in a specific order

    I think you want something like this.

    with OrderedResults as

    (

    select lastname

    , firstname

    , address1

    , ROW_NUMBER() over(partition by address1 order by firstname) as RowNum

    from #students

    )

    , FirstValues as

    (

    select lastname

    , firstname

    , address1

    , ROW_NUMBER() over(order by...

  • RE: Trying to get results in a specific order

    Like this?

    select *

    from #students

    order by lastname, address1, firstname

    Oh nvm...I see what you want. What a strange requirement for an order. One sec...

  • RE: cursor

    skrknarayana (9/11/2014)


    Hi,

    can someone share a simple stored procedure example to pass table name as output and output as cursor ?

    sample query need to use in procuderure:

    SELECT top 10 name...

  • RE: How to update this?

    I got totally lost in the explanation and you don't really seem to have a question. Can you put together ddl and sample data along with desired output so we...

  • RE: First Web Page to Query Sql Server

    Ryan1 (9/11/2014)


    Sean Lange (9/11/2014)


    Teaching you how to write a web application is way beyond the scope of an online forum and is subject to everybody's personal taste. If you are...

  • RE: Are the posted questions getting worse?

    SQLRNNR (9/11/2014)


    Sean Lange (9/11/2014)


    Koen Verbeeck (9/11/2014)


    SQLRNNR (9/11/2014)


    Everything is awesome

    And thanks for putting that in my head for the rest of the day... 🙂

    Everything is cool when you're part of ...BLAM!...

  • RE: Select Unique Customers per month for last 2 years..

    Alan.B (9/11/2014)


    Sean Lange (9/11/2014)


    Alan.B (9/10/2014)


    months as

    (

    select 1 as MoNo, 'January' as Mo union all

    select 2 as MoNo, 'February' as Mo union all

    select 3 as MoNo, 'March' as Mo union...

  • RE: First Web Page to Query Sql Server

    Ryan1 (9/11/2014)


    Hey guys,

    I would like to make my first web page which can talk to a local sql 2008r2 server and I am not sure where to begin. I...

  • RE: decimal data type round off the values

    Here is another one. I am sure some other will come along and soon you will have a dozen ways to do this.

    cast(34.456 * 100 as int) / 100.0

  • RE: decimal data type round off the values

    There are a number of ways you can do this. Here is one of them.

    FLOOR((34.456 * 100)) / 100.0

    The .0 is important here or you will have integer math and...

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (9/11/2014)


    SQLRNNR (9/11/2014)


    Everything is awesome

    And thanks for putting that in my head for the rest of the day... 🙂

    Everything is cool when you're part of ...BLAM! BLAM! BLAM! Make...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (9/10/2014)


    Hooray!! We have Internet again!! Been down for nearly 24 hours. Can't wait to get back to 1st World Internet capabilities!

    Welcome back!!!

  • RE: Are the posted questions getting worse?

    WayneS (9/10/2014)


    Steve Jones - SSC Editor (9/10/2014)


    WayneS (9/10/2014)


    Sean Lange (9/9/2014)


    I think I should be able to make it for the afternoon sessions. The last game should be done a little...

  • RE: Select Unique Customers per month for last 2 years..

    Alan.B (9/10/2014)


    months as

    (

    select 1 as MoNo, 'January' as Mo union all

    select 2 as MoNo, 'February' as Mo union all

    select 3 as MoNo, 'March' as Mo union all

    select 4 as...

Viewing 15 posts - 3,841 through 3,855 (of 15,381 total)