Forum Replies Created

Viewing 15 posts - 2,671 through 2,685 (of 2,894 total)

  • RE: CONDITIONAL SELECT - HELP

    Paul White NZ (6/25/2010)


    Eugene Elutin (6/25/2010)


    It just a bit unpredictable sometimes...

    My favoured one is "division by zero error" in SELECT Col1/Col2 FROM MyTable WHERE Col2 != 0

    That's not unpredictable...it's a...

    _____________________________________________
    "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: Delete too long

    Tara-1044200 (6/25/2010)


    I am running hte following query to delete since 7 days its not yet finished, any thoughts ? and the number of records involved are 56734591

    set nocount on

    SET...

    _____________________________________________
    "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: CLR script in strartup sql services to enable when service restart

    How are you enabling CLR?

    You can do it by t-sql:

    EXEC sp_configure 'show advanced options' , '1';

    go

    reconfigure;

    go

    EXEC sp_configure 'clr enabled' , '1'

    go

    reconfigure;

    go

    -- just to turn off advanced options:

    EXEC sp_configure 'show advanced...

    _____________________________________________
    "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: CONDITIONAL SELECT - HELP

    Paul White NZ (6/25/2010)


    ...Not too many SQL DBAs would be able to make that transformation by visual inspection. The optimiser is a truly amazing piece of kit.

    ...

    Can't disagree.

    It...

    _____________________________________________
    "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: Code to convert varchar datatype that contains a numeric expression to a date

    Paul White NZ (6/25/2010)


    ...

    I first came across this around the time the article I referenced came out - which would be four or so years ago. I was aware...

    _____________________________________________
    "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: Code to convert varchar datatype that contains a numeric expression to a date

    Paul White NZ (6/25/2010)


    ...

    Try a search for "schemabinding udf" - it's result #4

    ...

    Cool, it works. But...

    To search for the above word combination you probably need to know about schemabinding...

    _____________________________________________
    "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: Select 4th highest salary

    [Oops, wrong entry]

    _____________________________________________
    "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: Select 4th highest salary

    The query can be even shorter (and faster) if you like:

    SELECT MIN([Salary]) FROM (SELECT DISTINCT TOP 4 [Salary] FROM [SSIS].[dbo].[Salary] ORDER BY [Salary] DESC) q

    But are you sure that you've...

    _____________________________________________
    "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 replace function to sp or view

    I though that the join to FeesCategory table in a function, whould ensure something... But I have overlooked that the LEFT JOIN has been used. However, function also checks if...

    _____________________________________________
    "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: Code to convert varchar datatype that contains a numeric expression to a date

    Paul White NZ (6/25/2010)


    ...

    SCHEMABINDING ensures that SQL Server checks the function for determinism.

    A function that is not schema-bound is marked by SQL Server as non-deterministic and as doing data access.

    http://blogs.msdn.com/b/sqlprogrammability/archive/2006/05/12/596424.aspx

    ...

    Paul,...

    _____________________________________________
    "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 replace function to sp or view

    The function you have doesn't look very good written...

    Actually you would not need this function in the first place!

    Anyway, here is a replacement query for your sp:

    ;WITH PaidFeesUsers

    AS

    (

    ...

    _____________________________________________
    "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: Help with (probably simple) query

    Use lmu92 query, it will even work in case if you will have more than one record with non-null Xaml.

    If you like, you can add every column into CTE,...

    _____________________________________________
    "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: Error Converting Varchar to Decimal Strange Behavior

    IsNumeric doesn't guarantee that your string can be converted into numeric datatype (as was mentioned in the previous post). Actually, it may show return false, when value can be converted....

    _____________________________________________
    "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: Auto generate script-file.

    In a past, I used to achieve it using SQL DMO (Distributed Management Objects). However, with addition of PowerShell support in SQL Server 2008, you better use SQL Server Management...

    _____________________________________________
    "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: Loop, Cursor or both?

    george.greiner (6/24/2010)


    Eugene Elutin (6/24/2010)


    george.greiner (6/24/2010)


    ...I have not used cursors before...

    And I believe, you don't need to use the cursor in this case as well 😀

    Please provide some DDL script 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]

Viewing 15 posts - 2,671 through 2,685 (of 2,894 total)