Forum Replies Created

Viewing 15 posts - 6,136 through 6,150 (of 18,926 total)

  • RE: Update multiple rows using Sub Query

    stan-617410 (5/13/2011)


    Running this query throws the "Subquery returned more than 1 value." error.

    What am I missing?

    Thanks for your help.

    You have a trigger on the updated table that can't handle...

  • RE: Know Your SQL Objects

    SanDroid (5/13/2011)


    Steve Jones - SSC Editor (5/13/2011)


    Hugo Kornelis (5/13/2011)


    WHAAT???

    In the daily newsletter, the question specifies to "select 4". Which is what I did. And then I find that the site...

  • RE: Search through all Databases, Tables and columns for a String dynamically

    Sean Lange (5/13/2011)


    Is this a one time thing??? I created a script several years ago to do just this sort of thing but it is 100% **cough** cursor **cough** based....

  • RE: ROW_Number Help

    Mark-101232 (5/13/2011)


    SELECT dt, DENSE_RANK() OVER(ORDER BY YEAR(dt), MONTH(dt)) rn FROM @tbl

    ORDER BY dt

    Nice, had never seen that function before!

  • RE: ROW_Number Help

    I had actually read it correctly the first time :hehe:

    SET DATEFORMAT YMD

    DECLARE @tbl table (dt datetime)

    insert into @tbl (dt)

    SELECT

    '2010-02-01' UNION ALL SELECT

    '2010-02-03' UNION ALL SELECT

    '2010-02-05' UNION ALL SELECT

    '2010-02-10' UNION ALL...

  • RE: Fill Factor "best" setting for GUID

    :hehe:

  • RE: ROW_Number Help

    Sorry I misread the question!!!!!

    SET DATEFORMAT YMD

    DECLARE @tbl table (dt datetime)

    insert into @tbl (dt)

    SELECT

    '2010-02-01' UNION ALL SELECT

    '2010-02-03' UNION ALL SELECT

    '2010-02-05' UNION ALL SELECT

    '2010-02-10' UNION ALL SELECT

    '2010-02-12' UNION ALL SELECT

    '2010-03-01' UNION...

  • RE: ROW_Number Help

    order by date

  • RE: ROW_Number Help

    check out partition by in the row_number topics of books online.

  • RE: which report layout should be used to this kind of display?

    You must have your data like this :

    gross fy1, fy2, fy3....

    net fy1....

    Create a new group on rows on group on the column that contains the run type. ...

  • RE: ROW_Number Help

    With (Base query)

    SELECT * FROM cte inner join

    (SELECT Date ROW_NUMBER() FROM CTE GROUP BY Date) dta

    ...

  • RE: which report layout should be used to this kind of display?

    dsh_roy (5/13/2011)


    col1 and col2 col3 are revenue columns, like net and gross revenues in the dollor amounts.

    So this is like a revenue type column?

    Make sure you get all the...

  • RE: Know Your SQL Objects

    Steve Jones - SSC Editor (5/13/2011)


    Hugo Kornelis (5/13/2011)


    WHAAT???

    In the daily newsletter, the question specifies to "select 4". Which is what I did. And then I find that the site thinks...

  • RE: Restore Sequence - Full and transaction log backups

    My pers preference... adapt to your needs.

    Take full backup during off hours. Move copy and restore with norecovery on 2nd server

    When you're getting close to the move copy...

  • RE: Know Your SQL Objects

    Steve Jones - SSC Editor (5/13/2011)


    OK, I went back and forth on "can" myself. I ended up leaving it, but I can see that it in fact may (no pun)...

Viewing 15 posts - 6,136 through 6,150 (of 18,926 total)