Forum Replies Created

Viewing 15 posts - 16 through 30 (of 46 total)

  • RE: Question on OBJECTPROPERTY

    SP with an OUTPUT parameter... not perfect but good enough

  • RE: Question on OBJECTPROPERTY

    Is there any function that could be used for this (check if a table in a different context has any identity field)?

    I have to check this in 1 million places,...

  • RE: Question on OBJECTPROPERTY

    I will do so... Thank you a lot for helping me with this one!!!

  • RE: Question on OBJECTPROPERTY

    Weird that it works fine for the other tables in Development DB (running it from a different context)..

    It must be something undocumented ...

    Then I have a second question -...

  • RE: Anybody knows by chance if this book will be ever released?

    Of course it helps! My favorite chapters are those on SQL Query Performance, Indexes, Statistics, Query Design and Blocking.

    And the last chapter (the checklist) should be on the desk of...

  • RE: Anybody knows by chance if this book will be ever released?

    It is an honor to me you guys are answering my question...

    I have bought your book, Grant (along with others on internals, troubleshooting & optimization topics).

    I am very interested...

  • RE: Optimizing a stored procedure

    You have to replace the inner while-end with four updates like this:

    update _stocfifo

    set dataintrare_o = stocuri.dataintrare, nrintdoc_o = stocuri.nrintdoc, tipdoc_o = stocuri.tipdoc

    from _stocfifo , @stoc_C scc, stocuri

    where

    scc.tipdoc='BT'...

  • RE: LEFT(string, n) for text type ?

    stupid me... substring is working, even for texttype...problem solved. 🙁

  • RE: Bug in CHARINDEX ?

    So I was wrong with the '%' signs ..... 🙁 Thank you a lot for all your help..

    The text type is going to be deprecated in the next sql server...

  • RE: Bug in CHARINDEX ?

    Actually I might have found a bug in PATINDEX too..

    The query below returns something like :

    0 es_text1

    0 es_text2

    0 es_text3

    0 es_text4

    0 es_text5

    0 es_text6

    select

    patindex('http://www.blabla.com/tx/chrts/nln_lstngs/cnrg_ntrm-eng.html', es_text),

    ES_TEXT

    from MultilingualText2

    where ES_TEXT LIKE '%http://www.blabla.com/tx/chrts/nln_lstngs/cnrg_ntrm-eng.html%'

    es_text...

  • RE: Very slow restore

    This is the content of the last daily backup :

    LogicalNamePhysicalName TypeFileGroupNameSize MaxSize

    xyz_DataE:\amddbs\xyz_Data.MDF D...

  • RE: Query Execution time take nearly 30 min

    Hi!

    Could you define an extra (covering) index on these fields : (ColD,ColB,ColC) and re-run the query?

    And could you please script the table, I'm just curious to see all the fields,...

  • RE: Freak query ...

    1 - select count(*) from import_cc_requests = 307 rows

    2 - select count(*) from import_cc_requests where reference in (select reference from import_cc_payments ) = 113 rows

    3 - select count(*) from import_cc_requests...

  • RE: Freak query ...

    Sorry guys, I updated the 1b query, this is supposed to be "rtrim(reference)" instead of just "reference".

    And reference doesn't have any NULL value in the 2 above mentioned tables ......

  • RE: Query Optimization problem(Heavy cost in Top n Sort)

    Could you please detail a little bit more your query? I suppose I haven't understood exactly what you need, because I would have written something like :

    SELECT ID , MAX(StatusID)...

Viewing 15 posts - 16 through 30 (of 46 total)