Forum Replies Created

Viewing 15 posts - 1,891 through 1,905 (of 2,894 total)

  • RE: finding duplicate records?

    You can just place your code surrounded with special tags which you can see on the left side of the text box where you're typing your post...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Constraint to prevent UPDATE after row is committed

    Jayanth_Kurup (3/15/2012)


    I wud go with the instead of trigger if this wasnt a frequent activity. else i wud create a new column called is modifiable. and update it with 0...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: how to convert seconds to time in sql

    To get time as HH:MM:SS from seconds, you don't need to calculates hours, minutes and seconds, format and concatenate them separately. You can just use one of standard CONVERT options:

    DECLARE...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: T SQL joins to ansi sql joins conversion

    Sean Lange (3/14/2012)


    ...The upside of manually updating your queries is it gives you a perfect opportunity to evaluate them and make some performance improvements.

    And also securing your job for few...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: "Divide by zero error encountered." in where clause on SQL 2008 and working OK on SQL 2000

    logavina (3/14/2012)


    This query was working on SQL 2000 but on SQL 2008 is giving me the error "Divide by zero error encountered.":

    UPDATE T_PRICE

    SET VAR =

    CASE

    WHEN PRICE <> 0 AND...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need ideas on query performance

    mayur birari (3/14/2012)


    @r.P.Rozema

    Thanks for the reply.

    The foreign key of A goes into 2 more tables just like table B. But those are not huge tables like table B. So idea...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Fast execution of query

    SQLKnowItAll (3/13/2012)


    Well, I'd like to turn the topic to why this would be used. Would I do a top 100 with a FAST 100? It seems needless to...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Linked serve limitation

    Kill them! Kill them! Kill them!

    😀

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Fast execution of query

    basically the same thing.

    That what I've thought from the beginning...

    Look's like nothing better to discuss on Tuesday evening :hehe:

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Fast execution of query

    SQLKnowItAll (3/13/2012)


    Ok, let's settle this. Its not about returning found rows faster or immediately. Its about FINDING the n rows faster (possibly), which as a direct result will...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Problem with update from another table

    Quinn-793124 (3/13/2012)


    Did I miss anything on the etiquette page?

    I was able to creat and load on of the 2 tables.

    Thanks

    Quinn

    No, you didn't! However, if you try to populate data in...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Swapping rows on a condition

    Or, even simpler:

    delete post

    from swap Pre

    join swap Post

    on Post.id = Pre.pre

    and pre.id = Post.post

    and...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Swapping rows on a condition

    I'm not sure if I'm correctly understood your reqs...

    Still my try:

    delete Post

    from swap Pre

    join swap Post on Post.id = Pre.pre

    where exists (select 1 from swap linked

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Fast execution of query

    ok, let's correct my words:

    It does not make query to run any faster! It just makes query to return required number of rows (n) immediately as they were found.

    The...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need ideas on query performance

    SQLKnowItAll (3/13/2012)


    Is there a non-clustered index on Table B for personid?

    It's defined as PRIMARY KEY CLUSTERED in the OP posted DDL...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 1,891 through 1,905 (of 2,894 total)