Forum Replies Created

Viewing 15 posts - 1,636 through 1,650 (of 1,923 total)

  • RE: Update records with similar values

    Here is another method. Again , Thanks for the Setup BOB!

    ;WITH CTE(RecID , RecType , Hierarchy , Msg,R)

    AS

    (

    select RecID , RecType , Hierarchy , Msg, ROW_NUMBER() OVER(PARTITION BY RecType ORDER...

  • RE: Row transpose

    Another variation of the same functionality but with much faster code

    ;WITH ORDERED_TABLE (ID, period1, R1, pname1, R2)

    AS

    (SELECT ID1

    ,period1, ROW_NUMBER() OVER(PARTITION BY ID1 ORDER BY...

  • RE: Row transpose

    Thanks, NewBeeSQL

  • RE: Help with sp_msforeachtable 'sp_spaceused "?"'

    Jinx-640161 (4/29/2010)


    I get a syntax error in the insert statement - it does not like :@SERVER_DB1.dbo.sp_msforeachtable

    The error I get is: Incorrect syntax near '.'.

    Can one use a variable like...

  • RE: Row transpose

    Beuatifully asked question and i-hope-it-is-beautiful code 😀

    Here you go

    ;WITH perid_CTE (ID, c1, c2, c3) AS

    (

    SELECT ID1, [1] PERIOD1,[2] PERIOD2,[3] PERIOD3 FROM

    (SELECT ID1, PERIOD1, ROW_NUMBER() OVER(PARTITION BY ID1 ORDER BY...

  • RE: Output to view using PIVOT

    jwellington (4/29/2010)


    Hi ColdCoffee,

    Thanks for your post. I understand your frustration. Thanks so much for the information you have helped me with so far. It has certainly put me on the...

  • RE: Output to view using PIVOT

    Wellington, as i had already asked, i need to see the records in your table (i dont want your orginal data, you may very well cook-up data that looks similar...

  • RE: Output to view using PIVOT

    Ok, as you have decided to forgo the date fomat, it becomes my duty to provide you the code that will replace NULL dates with 'N/A'.

    Here is that final (presumably...

  • RE: How to update efficiently?

    My pleasure, explaining and learning with you, George!

  • RE: Trying to get the Parent Child details...

    Welcome, Mithun!

  • RE: Missing numbers in a series

    Oh Oh.. thats what..i was scratching my head to find this out.. Thanks Peter 🙂

  • RE: Missing numbers in a series

    Peter, i have got one doubt actually.. not related to the OP's request, but general doubt..

    in your code , you have given the INSERT statement as

    INSERT INTO @MissingNumbers

    VALUES (1),(2),(4),(5),(7),(8),(11),(12),(13),(15),(17),(19),(20)

    When i...

  • RE: Grouping question

    Hi Buddy,how about you going through this following article and helping us help you?? 🙂

    CLICK HERE FOR FORUM POSTING ETIQUETTES - JEFF MODEN[/url]

    When u do so, i am sure a...

  • RE: How to swap rows to columns

    Yana, you will have to use Dynamic SQL if you are unsure of the start and end dates.. Here is that piece of code..

    SET NOCOUNT ON

    IF OBJECT_ID('TEMPDB..#SomeTable1') IS NOT...

  • RE: Decimals being Dropped by Update

    My pleasure, Harvey 🙂

Viewing 15 posts - 1,636 through 1,650 (of 1,923 total)