Forum Replies Created

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

  • 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 🙂

  • RE: Decimals being Dropped by Update

    Or further, to be fool proof, modify your UPDATE statment like this

    update #test

    Set Amount_Sterling =

    Case when local_amount is null then cast(amount as real)

    else cast(local_amount as real) / 100.00

    end

    Type-Cast...

  • RE: Help me to write a query

    lmu92 (4/28/2010)


    You'll (hopefully) find your answer over at stackoverflow... 😉

    LOL, Lutz 😀

  • RE: Decimals being Dropped by Update

    In the update statement, divide it by 100.00 .. THen you wil get the 2 point precision..

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