Forum Replies Created

Viewing 15 posts - 526 through 540 (of 2,008 total)

  • RE: choose a random record

    GilaMonster (12/29/2011)


    Dev (12/29/2011)


    Place rand() * 100 function in your WHERE clause.

    Example:

    WHERE some_int_column= rand() * 100 -- or cast it as INT

    That's not more or less random than ordering...

  • RE: choose a random record

    xRafo (12/29/2011)


    Hi,

    thanks!

    but the outcome of the query needs to be a character..

    You can SELECT a character column of your choice in query. I asked it to place it in...

  • RE: Are the posted questions getting worse?

    SQLRNNR (12/29/2011)


    GilaMonster (12/29/2011)


    Grant Fritchey (12/29/2011)


    GilaMonster (12/29/2011)


    Grant Fritchey (12/27/2011)


    Based on the fact that we can't get people to run good sets of backups despite Umptymillion articles, blog posts, presentations, webcasts and...

  • RE: Converting to last minute of a month

    david.kratz (12/29/2011)


    A solution I often use is

    Instead of saying date <= last-second-of-previous-month

    I say

    date < trunc(sysdate,'MM').

    Of course this is out of the question if using Between.

    In that case the afore-mentioned...

  • RE: choose a random record

    xRafo (12/29/2011)


    Hi,

    I just need 1 row,

    but with that query i executed 2 times and give me 2 same..

    i need not repeat the result..

    Place rand() * 100 function in your WHERE...

  • RE: Are the posted questions getting worse?

    Dev (12/29/2011)


    Stefan Krzywicki (12/29/2011)


    GSquared (12/29/2011)


    Dev (12/29/2011)


    I thought some "Magic" (recovery trick) will happen & that DB will be saved. It’s a nice learning opportunity that I...

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (12/29/2011)


    GSquared (12/29/2011)


    Dev (12/29/2011)


    I thought some "Magic" (recovery trick) will happen & that DB will be saved. It’s a nice learning opportunity that I missed. However the...

  • RE: Are the posted questions getting worse?

    I thought some "Magic" (recovery trick) will happen & that DB will be saved. It’s a nice learning opportunity that I missed. However the lessons learnt today (reminder actually), keep...

  • RE: Chagne Database Physical File name

    ALZDBA (12/29/2011)


    toddasd (12/28/2011)


    Dev (12/28/2011)


    ...

    Why copy pasta msdn and link to it?

    To make the suggestion brief and provide the a ref in case someone wants more info. #GoodJob...

  • RE: Join-cardinality estimation BUG (up to 50% error) with evenly distributed data in hystogram?

    Per BOL:

    When a query is first compiled, if the optimizer needs a particular statistics object, and that statistics object exists, the statistics object is updated if it is out of...

  • RE: Change the job history log

    ndessaint (12/29/2011)


    Hello,

    Thanks for your answer. I had not thought this.

    The solution is :

    EXEC msdb.dbo.sp_purge_jobhistory @oldest_date=GETDATE()-14

    EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=-1,

    @jobhistory_max_rows_per_job=-1

    Thanks

    Nicolas

    As I have already said, I was not sure. It’s your...

  • RE: help in logic

    PaulB-TheOneAndOnly (12/29/2011)


    Dev (12/29/2011)It looks like ...

    ...but you don't know, huh? why don't just answer what op asked for instead of going border line off topic for no...

  • RE: help in logic

    PaulB-TheOneAndOnly (12/29/2011)


    Dev (12/29/2011)


    Adding another thought. Is there any reason for doing it in database side? It should be done on Front End (application).

    Why? What's wrong with backend...

  • RE: help in logic

    Adding another thought. Is there any reason for doing it in database side? It should be done on Front End (application).

  • RE: Nested Set Optimization Fun and Sunshine

    GSquared (12/28/2011)


    ...

    Here's some data on nested sets: http://en.wikipedia.org/wiki/Nested_set_model

    Nested Set Model is introduced By Joe Celko??? :w00t: It’s news to me.

    Sorry for being blunt, I don’t like him for his insulting...

Viewing 15 posts - 526 through 540 (of 2,008 total)