Forum Replies Created

Viewing 15 posts - 1,351 through 1,365 (of 2,894 total)

  • RE: Convert Text to Date DataType

    rVadim (8/16/2012)


    Instead of 103 use 03

    DECLARE @D CHAR(10) = '17/08/12'

    SELECT CONVERT(date, @D, 03)

    03? That is old ambulance number in Russia, you can use just 3 ...:hehe:

    Actually, SQL can convert '17/08/12'...

    _____________________________________________
    "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: UPDATE when the values are the same

    Sergiy (8/16/2012)


    You miss the point.

    Once again:

    UPDATE test

    SET name = 'Tom'

    WHERE NAME = 'Tom'

    Does this one writes into the page?

    ...

    Basically does it cause physical I/O operation on the disk?

    My answer...

    _____________________________________________
    "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: read the current row and previous row & calculate difference reporting values over

    scott_lotus (8/15/2012)


    I am trying to write a script to read the current row and previous row per device and work out the difference reporting values over X (> than 20...

    _____________________________________________
    "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: While Loop into a Set Based Insert

    First thing I would do is de-noodling the code so it can be readable:

    a.) Format with proper indenting of code between BEGIN and END

    b.) Remove the hoard of commented out...

    _____________________________________________
    "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: What is meant by set based programming?

    ...

    To be fair, we'd start from a file, because if the contest is aggregating from a table, assembly wins because I'll pick a table definition that consists of putting 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: When and where should i use left join or right join ?

    Jay Pete (8/14/2012)


    Hi

    I am newbie in the T-SQL Programming.

    Please anyone can explain to me when and where i should use left join or right join with nice example.

    Thanks 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: What is meant by set based programming?

    ...

    That said - if I gave you a file or a table with 10,000,000 invoices and I needed to get a balance by customer, I guarantee you SQL server 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: Asterisk in varchar field

    All your single quotes must be escaped by doubling them:

    SELECT [ValidationRule]

    = '[PERFORMINGPROVIDERID]=COALESCE(NULLIF([PERFORMINGPROVIDERID],''''),NULLIF([PERFORMINGPROVIDERNPI],''''),NULLIF([BILLINGPROVIDERNPI],''''),REPLICATE(''*'', 10))'

    _____________________________________________
    "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: Using REPLACE with a string where I need to replace %anystring% with some new string

    If you are looking for performance, then "well-done" CLR using RegEx will outperform T-SQL for large and/or complex string replacements.

    _____________________________________________
    "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: Yet another rows to column question (sorry)

    drew.allen (8/14/2012)


    If you're trying to do what I think you are, then the answer is that you can't do it in SQL. First Normal Form for databases is that...

    _____________________________________________
    "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: What is meant by set based programming?

    ...

    Anybody who's taken just a little bit of math in university should be able to relate to a matrix.

    Ough! Yes! I have seen this film! Also, I've seen 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: unique constraint

    ...

    Same here. Experience takes precedence over theory.

    ...

    Actually, you wouldn't even need a lot of experience to choose surrogate PK over natural key. Use common sense or apply pure mathematical...

    _____________________________________________
    "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: unique constraint

    Sergiy (8/12/2012)


    CELKO (8/10/2012)


    like the idea of having a sid (a surrogate id) on my tables, even if I do have a natural key that can serve as a primary...

    _____________________________________________
    "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: unique constraint

    ...

    Removed...

    :

    Don't forget to buy and read all his books, otherwise you will be left in unknowing state for ever!

    :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: much worse execution plan calling stored procedure vs. query window

    What is your default connection option in EM for ANSI_NULLS? I think it will be OFF. In old QA it used to be ON...

    Try to create your proc as per...

    _____________________________________________
    "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,351 through 1,365 (of 2,894 total)