Forum Replies Created

Viewing 15 posts - 241 through 255 (of 425 total)

  • RE: What is a $pseudocolumn?

    don't take my response as the gospel truth. it's just a guess/possibility. :unsure:

  • RE: Oracle LEAD function - Is there an equivalent function in SQL Server ??

    I don't think there's a direct equivalent for LEAD()/LAG(). However, you can perform the same type of processing with ROW_NUMBER() and a self-join.

    Look at the...

  • RE: What is a $pseudocolumn?

    SQLCMD supports $xxx variables that are somewhat like macros and can exist across batches. With it you can write statements like:

    UPDATE $table SET ...

    or

    SELECT ..., $col, ... FROM ...

    Perhaps...

  • RE: Rows to Column

    unfortunately, this alternative requires a temp table since it doesn't seem CTEs can be nested. it works with the #prod_desc table in the original post.

    select pid, pdesc,

    ...

  • RE: Multiple update aggregate with multiple conditions

    hi cees,

    can you edit your previous post and break 'INSERT INTO mcmain.volcdet (vd_volcnmr, vd_upnmr, vd...' onto multiple lines? that will make your post narrower and easier to read.

    multiple columns...

  • RE: Splitting Data from One Column into 5 Columns

    Jeff Moden (4/2/2008)


    Antonio,

    Your solution doesn't work with the test data I created. Please post your test data generator and the result times you got.

    Sorry. The Parameters column became...

  • RE: Splitting Data from One Column into 5 Columns

    declare @xml XML

    -- convert all row data to an XML element

    set @xml = (

    select cast('<parm ReportKey="'+ cast(ReportKey as varchar(12))

    +'" TimeStart="'+ cast(TimeStart as varchar(32))+ '"...

  • RE: CTE question

    Matt Miller (4/2/2008)


    It's just a tad bit messy. Performance issue prone from what I can see. It evokes building Excel files from macros, etc.... Hard to troubleshoot,...

  • RE: Splitting Data from One Column into 5 Columns

    Jeff Moden (4/1/2008)


    Ok... here's my entry for the virtual beer...

    Looking forward to your entry 😉

    No fair working at night... my wife won't let me get geeky at night.

  • RE: Splitting Data from One Column into 5 Columns

    sounds like a challenge to me! winner buys a round of beer for everyone?

  • RE: Splitting Data from One Column into 5 Columns

    Jeff Moden (4/1/2008)


    Just checking to be sure... do all the rows have exactly the same number of "fields" and all the rows are always in the same basic format?

    since that...

  • RE: Performance: Every nth item

    eliminating some of the nested derivations might help:

    with Skipper( item, rowNum)

    as

    (

    SELECT item, ROW_NUMBER() OVER (ORDER BY item)

    ...

  • RE: Performance: Every nth item

    performance is slow because your query with row_number() will number ever row regardless of whether or not you retrieve it.

    are you looking for random/sample data? if so, you can...

  • RE: QUERY help

    Enbee: look at the topic titled "Recursive Queries Using Common..." in SQL Server 2005 Books Online and take better notes in class. 😀

  • RE: Splitting Table Column on Delimiter

    Btw, BCP's err files (-e) filter all rows for a failed batch, not just the offending row(s). And using too large a batch size can cause issues with the...

Viewing 15 posts - 241 through 255 (of 425 total)