Forum Replies Created

Viewing 15 posts - 106 through 120 (of 2,894 total)

  • RE: Replace a Cursor

    Since @CompanyName is also part of the table name it would be easy to leverage sys.objects to see if that table exists.

    ...

    or use OBJECTPROPERTY function.

    No cursor or loop requried...

    _____________________________________________
    "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: CONVERT PLSQL TO TSQL

    STYLES (7/1/2014)


    OK

    this is where i am at and stuck

    declare @period_name as date = 'DEC-10'

    case when substring(period_name,5,2) = '@periodname' THEN SUBSTRING('@periodname' ,5,2)

    the period names are in format ...

    _____________________________________________
    "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: Derived tables vs Normal table joins

    In the OP case, there are many ways to write the query to return the same results, eg. using temp tables for intermidiate results...

    Again, it's impossible to generalise the best...

    _____________________________________________
    "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: convert PLSQL TO TSQL

    Double Post!

    Replies in:

    http://www.sqlservercentral.com/Forums/Topic1588112-3077-1.aspx

    _____________________________________________
    "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: CONVERT PLSQL TO TSQL

    Use

    Oracle DECODE = T-SQL:

    CASE WHEN [condition 1] THEN [expression 1]

    WHEN [condition 2] THEN [expression 2]

    ...

    _____________________________________________
    "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: Can NoLock be used on table-returning functions?

    nonghead-webspam (7/1/2014)


    Reason I want to use NoLock is because queries are returning slowly. Instructions say that is what it is good for.

    This is on a reporting database, not 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: Derived tables vs Normal table joins

    ... My colleague argues that it is more efficient to use derived tables rather than joining two tables say and filtering with a Where clause. ...

    You can argue to 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: Can NoLock be used on table-returning functions?

    ...Must NoLock be used only on a query selecting from a table, or can it be on a table-returning function?

    You better not to use NoLock at all.

    What is your...

    _____________________________________________
    "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: XML Validation: Invalid simple type value dateTime

    http://connect.microsoft.com/SQLServer/feedback/details/167649/xml-schema-collection-does-not-properly-validate-an-xsd-datetime

    _____________________________________________
    "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: returning only portion of string

    Alan.B (6/19/2014)


    Eugene Elutin (6/19/2014)


    SUBSTRING is more standard than PARSENAME so the code would be more portable using SUBSTRING (for those people that care about that stuff :-P)

    Yep, as long...

    _____________________________________________
    "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: Multiple ON Clauses In One Join?

    Chris Wooding (6/20/2014)


    Surely SELECT COUNT(*) should return 42?

    Why so? Of course not!

    On a clear, moonless night about 3,000 stars are visible with the unaided eye. A small telescope 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: returning only portion of string

    SUBSTRING is more standard than PARSENAME so the code would be more portable using SUBSTRING (for those people that care about that stuff :-P)

    Yep, as long you port 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: Modify Job Log Path

    use sp_update_jobstep

    _____________________________________________
    "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: returning only portion of string

    May I ask please, if there is any reason to use SUBSTRING instead of PARSENAME other than love of typing and having more of pink in the code, especially...

    _____________________________________________
    "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: Incremental Load

    I hope I m not only the one here who cannot make any clue out of OP question...

    What query brings data from source and destination?

    What is your exepected results based...

    _____________________________________________
    "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 - 106 through 120 (of 2,894 total)