Forum Replies Created

Viewing 15 posts - 6,226 through 6,240 (of 10,144 total)

  • RE: Concatenate 2 rows based on grouping

    pwalter83 (6/20/2012)


    ... I have some other tables that are also being used in the query as well. Can that be taken into account as well ?

    Thanks.

    Of course. Can you post...

  • RE: Record Matching in FIFO Basic in Stock data

    Nageswari.J (6/20/2012)


    Hi Chris

    Yeah u r correct, I also face the same problem when i checked.. I thought to ask to u. before itself u answered... Thanks once...

  • RE: Concatenate 2 rows based on grouping

    pwalter83 (6/19/2012)


    ChrisM@Work (6/19/2012)


    Paul, how many rows max will you have to roll up like this? Your example shows two rows - can it be 3, or 4, or n?

    Could be...

  • RE: Help needed to INSERT using a column values variable as a result of a SELECT

    Your first post has a code sample like so:

    DECLARE @eof as nchar(1)

    DECLARE @replace as nvarchar(max)

    DECLARE @exec as nvarchar(max)

    SELECT @eof = CONVERT(NCHAR(1), 0xFDF8)

    SELECT @replace = char(39) + char(39) + char(39) +...

  • RE: Concatenate 2 rows based on grouping

    Paul, how many rows max will you have to roll up like this? Your example shows two rows - can it be 3, or 4, or n?

  • RE: Row_Number doubt

    snigdhandream (6/19/2012)


    I have a large table having millions of rows. There is one datetime column which captures the date and time a row is inserted to the table. Now, I...

  • RE: select statement blocking update statement until select statement is finished

    If you absolutely cannot follow any of Grant's excellent suggestions, then there is a cheat which may work for you:

    -- fuzzy non-blocking prefetch, faster without blob column

    SELECT [ONLY the...

  • RE: Search with 80% accuracy

    Fuzzy matching generates a similarity index between two strings: try this and this.

    Cheers

    ChrisM

  • RE: Record Matching in FIFO Basic in Stock data

    Gosh, thanks for the generous comments guys - however, the method fails if the sample data set is expanded to have more sales than buys within a partition. Here's code...

  • RE: Record Matching in FIFO Basic in Stock data

    This generates the correct results from the given sample data, however I'd be more comfortable with a larger sample:

    ;WITH Buys AS (

    SELECT rn = ROW_NUMBER() OVER (PARTITION BY clientcode, productid...

  • RE: Nasty, nasty, nasty....

    Stueyd (6/13/2012)


    ....So for example, I insert a new row of data into the main table it will also cascade the identity into about 14 other tables....

    Interesting. Care to elaborate?

  • RE: Nasty, nasty, nasty....

    Have a look at Glenn Berry's diagnostic information queries[/url]. Two of these queries should be particularly relevant to you; missing indexes, and unused indexes. The comments attached to both are...

  • RE: Case With Group by Row Values into Column

    farooq.hbs (6/17/2012)


    If i Execute the above query

    I'm getting Result set as

    Msg 2714, Level 16, State 6, Line 8

    There is already an object named '#View_Tag' in the database.

    The #temp...

  • RE: Unpivoting Data

    Jeff Moden (6/15/2012)


    ChrisM@Work (6/15/2012)


    vinu512 (6/15/2012)


    ChrisM@Work (6/15/2012)


    anthony.green (6/15/2012)


    Thanks guys, much appreciated. Was racking the brain yesterday on that and for the life of me couldnt get unpivot working.

    I like the...

  • RE: Case With Group by Row Values into Column

    I'm right with you on that Sean. There are some other quirks in the query which suggest that if it's generating correct results, it is, to some extent, a happy...

Viewing 15 posts - 6,226 through 6,240 (of 10,144 total)