Forum Replies Created

Viewing 15 posts - 6,946 through 6,960 (of 10,144 total)

  • RE: replicating records w/o using a cursor

    Much simpler than you think - join to a tally table on dbo.SOP10200.QUANTITY.

    What folks often forget about tally tables is that they are a source of rows as well...

  • RE: Using CASE in a WHERE clause

    GSquared (12/3/2010)


    select *

    from dbo.MyTable

    where @Parameter = 'A'

    or (ParentTradeID is not null and @Parameter = 'O')

    or (ParentTradeID is null and @Parameter = 'R');

    Wouldn't that do it?

    Hey Gus, reckon you're still...

  • RE: Burned Out?

    WayneS (12/3/2010)


    Chris Morris-439714 (12/3/2010)


    CirquedeSQLeil (12/2/2010)


    Jack Corbett (12/2/2010)


    For those not on twitter and who don't have my blog in their feed reader (shame on you!), here's the blog post I mentioned,...

  • RE: Update Table If Record Exists Else Insert ?

    The two-stage method mentioned by GSquared is outlined here.

  • RE: Today's Random Word!

    Craig Farrell (12/2/2010)


    Logging - That orange tree really needs to come down....

    Lemonwood makes an excellent bow, wonder if orange is any good?

  • RE: Burned Out?

    CirquedeSQLeil (12/2/2010)


    Jack Corbett (12/2/2010)


    For those not on twitter and who don't have my blog in their feed reader (shame on you!), here's the blog post I mentioned, http://goo.gl/fb/FviPR

    I am going...

  • RE: add data separate with a coma in temp table !?

    WayneS (12/2/2010)


    Chris,

    Interesting code. Do you have any performance testing on your method compared to the DelimitedSplit8k function? (Click here for the latest Delimited Split Function.)

    Hi Wayne, no I've not done...

  • RE: Find Similar rows and add totals together.

    @leroy - thanks.

    @scott - your method will almost certainly perform better than mine, with two analytical functions.

  • RE: Find Similar rows and add totals together.

    scott.pletcher (12/2/2010)


    I thought E was an id value and thus unique. Maybe I'm wrong there.

    Maybe not - there's not enough info.

  • RE: Find Similar rows and add totals together.

    scott.pletcher (12/2/2010)


    Barring some type of "fuzzy" update, the fastest way is probably to save your results as a temporary table, then use that table to UPDATE the original data and...

  • RE: Split string of concatenated words

    Try this, Tim:

    DROP TABLE #Sentences

    CREATE TABLE #Sentences (Sentence VARCHAR(100))

    INSERT INTO #Sentences (Sentence)

    SELECT 'QualificationsLength' UNION ALL

    SELECT 'DepthMustBeNumeric' UNION ALL

    SELECT 'HeightMustBeNumeric' UNION ALL

    SELECT 'WidthMustBeNumeric' UNION ALL

    SELECT 'DepthNotValid' UNION ALL

    SELECT 'HeightNotValid' UNION ALL

    SELECT...

  • RE: Split string of concatenated words

    Tim-24860 (12/2/2010)


    I wonder if anyone could help me with a problem I'm having.

    I have some data in a table that contains many joined words e.g. ThisIsASample

    What I would like to...

  • RE: avoding recursion in CTE

    Abhijit More (12/2/2010)


    Is there is any way to break / avoid the recursion in the CTE QUERY??

    Break? What do you mean?

    Avoid? Yes of course - don't write your CTE as...

  • RE: Extracting duplicates within a specific range

    You might find it easier to use a temp table to hold your ranges. Finding the dupes is straightforward:

    DROP TABLE #Person

    CREATE TABLE #Person (Number CHAR(5), Firstname VARCHAR(20), Lastname VARCHAR(40), Email...

  • RE: add data separate with a coma in temp table !?

    -- make some sample data, about 100,000 rows

    DECLARE @variable TABLE (OneRowOfData VARCHAR(200))

    INSERT INTO @variable (OneRowOfData)

    SELECT '12345|name|domaine|category|2010/11/15|2011/10/30|2|' UNION ALL

    SELECT '12346|name|domaine|category|2010/11/15|2011/10/30|2|' UNION ALL

    SELECT '12347|name|domaine|category|2010/11/15|2011/10/30|2|'

    INSERT INTO @variable (OneRowOfData) SELECT * FROM @variable

    INSERT INTO...

Viewing 15 posts - 6,946 through 6,960 (of 10,144 total)