Forum Replies Created

Viewing 15 posts - 526 through 540 (of 562 total)

  • RE: A quick query puzzle:

    Hello all,

    Because I goofed a bit in my previous solution here the worked out code.

    It's a solution which only used simple replaces, not efficient (lots of updates).

    ben brugman

    -- Ben Brugman

    --...

  • RE: Database to hold/keep scripts.

    bitbucket-25253 (10/5/2012)


    I have what I call a sandbox DB to hold scripts, some T-SQL and have it set up so as to be able to search by key words, for...

  • RE: Database to hold/keep scripts.

    Sqlfrenzy (10/5/2012)


    you can use a version control tool for it.

    Thanks for your anwser.

    To my knowledge (I know VSS and TFS) version control tools can only store versions of files. At...

  • RE: A quick query puzzle:

    With a large amount of replaces this can be done.

    Problem is that the number of replaces is very large.

    So I'll show the concept but not the code, because the code...

  • RE: A quick query puzzle:

    With a large amount of replaces this can be done.

    Problem is that the number of replaces is very large.

    So I'll show the concept but not the code, because the code...

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    ScottPletcher (9/17/2012)


    Yes, but not unfairly so; the values I used are always inherent in the problem. In order to solve the problem, you must know at least one of...

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    Cadavre (9/17/2012)

    So the fastest ones after one run are: -

    ScottPletcher: 0ms

    Cadavre: 3ms

    ChrisM@Work: 4ms

    Eugene Elutin: 5ms

    Dwain: 7ms

    Eugene Elutin: 11ms

    Personally, I'd call those times equivalent. I suspect that the fastest one would...

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    Another solution, I think shorter and more efficient, this because only 865 rows need to be generated and inspected.

    with a as ( select 123 as n union all select...

  • RE: Difference between a CROSS JOIN and a 'comma'

    GSquared (9/14/2012)


    Gazareth (9/14/2012)


    They are equivalent, but I don't think you can mix the two types of join in the same query.

    That means the two are not semantically identical in the...

  • RE: Difference between a CROSS JOIN and a 'comma'

    Lowell (9/14/2012)


    yes it's true; there are two ways to cross join tables.

    I do realize that there a two ways for the cross join. And I know that the comma syntax...

  • RE: SQL taking long time

    subbareddy542 (9/14/2012)


    please use #temp table in plase of CTE.

    Please explain why a #temp table should be used.

    I have been using CTE expressions and used #temp tables to 'force' the...

  • RE: Check room availability in hotel system

    Overlapping of times.

    The overlapping of times is often handled wrong.

    Suppose we have a table with booked_start and booked_finish.

    And you have a begintime and endtime for which you want the 'overlapping'...

  • RE: Transparent partitioning.

    HowardW (8/23/2012)


    :

    The point of partitioning is normally to divide your tables using a natural key, like a transaction date, or a month end date etc. in order to immediately narrow...

  • RE: sql query prob

    Sorry for the repeats. Ben

  • RE: sql query prob

    CREATE TABLE tablename

    (

    id int NULL,

    name varchar(50) NULL,

    val int NULL

    )

    insert into tablename VALUES (1 ,'abc' ,100)

    insert into tablename VALUES (2 ,'ravi' ,null)

    insert into tablename VALUES ('','venu' ,200)

    insert into tablename VALUES (3...

Viewing 15 posts - 526 through 540 (of 562 total)