Forum Replies Created

Viewing 15 posts - 2,386 through 2,400 (of 2,894 total)

  • RE: sql trigger using cte - need help

    drew.allen (8/17/2010)


    Eugene Elutin (8/17/2010)


    Could you please advise how many records you are expecting to be inserted into this table at-once (eg. using INSERT ... SELECT...type of queries).

    Will it be...

    _____________________________________________
    "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: copying 1 table with indexes to another same server

    roy.tollison (8/16/2010)


    i want to create a stored procedure that allows a user to run it with the name of the table they want to backup/save in case they need 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: Single DELETE statement show high reads

    Ok, the number of logical reads will also depend on how many rows is affected by your query and how many indexes it should update.

    As you have index on ScheduleRId,...

    _____________________________________________
    "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: Single DELETE statement show high reads

    Does your delete uses indexed column in WHERE clause?

    High number of logical reads in your case may be due to fragmented indices. Try to defrag them using DBCC INDEXDEFRAG or...

    _____________________________________________
    "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: Single DELETE statement show high reads

    Logical read shows the total number of data pages needed to be accessed from data cache to process query. It is quite possible that logical read will access same data...

    _____________________________________________
    "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: Retrieving values of a tree structure into a table

    You will find the answer here:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "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: SR Help

    Can you code in C# or do you have anyone available with this skill (you don't need an expert for this task)?

    _____________________________________________
    "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: Single DELETE statement show high reads

    LutzM (8/17/2010)


    ...

    If there is more than one value, use a subquery and join on it instead of using IN.

    That it is no longer gurateeed to be the better way 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: sql trigger using cte - need help

    iain-656842 (8/16/2010)


    Thats interesting. I never thought of that.

    So the trigger would just copy the "inserted" data?

    Actually, to help you more we need a bit more details from you.

    Could you please...

    _____________________________________________
    "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: Why is a variable treated as a charvar

    Kind of. I have just shown how you can pass table name (or column name) in the input parameter (or variable) and use it to build dynamic SQL. You are...

    _____________________________________________
    "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: SR Help

    It is not the best solution to use T-SQL for these sort of tasks.

    Formatting of data for GUI should be done in GUI itself or, at least, in 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: Identifying a trigger

    You can do something like:

    CREATE TRIGGER [TRIGGER-NAME] ON [TABLE-NAME] FOR INSERT, UPDATE, DELETE

    AS

    BEGIN

    SET NOCOUNT ON

    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: Why is a variable treated as a charvar

    scott.pletcher (8/16/2010)


    Not completely true, you can do it using dynamic SQL to create the sql command to execute, however, in this case that is not the way to go. i...

    _____________________________________________
    "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: optimise avoid using loop

    Without seeing all picture how would anyone know that

    "CustomerLoopTbl is a copy of #TempResults (without AmountLastest field)" and it exists only in order for controlling your loop? Ok, name...

    _____________________________________________
    "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: optimise avoid using loop

    What about DDL for your tables and UDF? Without these, no much futher to advise. Most likely it is possible to replace your loop with better performing set-base code. But,...

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