Forum Replies Created

Viewing 15 posts - 3,556 through 3,570 (of 6,036 total)

  • RE: bcp password prompt

    Jeff Moden (21/09/2007)


    Great idea, George... just keep in mind that only works if you're calling BCP via xp_CmdShell in T-SQL or you have Windows Authentication enabled on the server...
  • RE: cluster index

    If you use the design I am suggesting, the PK of the parent table is part of each and every child table. (does this add space to your system? YES!!!)...

  • RE: Error in stored procedure

    Number of opened and closed brackets in one of your lined don't match.

  • RE: SLOW Update

    AND ws.CreateDateTime >= @start

    AND ws.CreateDateTime < @last

    causes table scan.

    FOr this query you should have clustered index on ( WorkOrders_ID, ServiceEvents_Code, CreateDateTime ).

    But if you perform a...

  • RE: Updating two tables, two databases,

    Remove comma before 2st "FROM" and remove all semicolons (";") from the script.

  • RE: Trigger not getting values from INSERTED

    Easy.

    If you update/insert more than 1 row.

  • RE: Untrappable Errrors

    Craig,

    as I said, it's not a run-time error.

    If in any .Net language you call a method which is not declared - can you catch this error?

    No, such code will fail...

  • RE: "Dynamic Error Trapping"

    As Jeff suggested, use sp_ExecuteSQL.

    Same way as you've been told in another your thread:

    EXEC @Error = sp_ExecuteSQL @sql, N'@param1 datatype, @param2 datatype, ...', {parameters}

    See BOL for more details.

  • RE: Untrappable Errrors

    By the way,

    Craig, don't use

    if not exists(select 1 from tempdb.sys.objects where name = '#fred')

    Not every user in every environment could have permissions to query system tables in system databases.

    Not...

  • RE: Untrappable Errrors

    I know.

    There is nothing to debate.

    It's just impossible for you to admit you're wrong or did not know something.

    No more issues here.

  • RE: Joining 2 Queries

    You must tell what binds "header" row to "details" rows.

    If you know this key then it's simple:

    SELECT

    {record set 1)

    UNION ALL

    SELECT

    {record set 2)

    ORDER BY KeyColumn

  • RE: Performance Tuning Guide

    Patience!

    It's only 5pm here.

    I need to pretend working for another hour!

  • RE: Joining 2 Queries

    As soon as you add missing columns to 2nd record set you need to use UNION ALL to unite them together and sort final result by some key value which...

  • RE: Performance Tuning Guide

    You welcome.

    Always happy to wash someone's brains.

  • RE: Untrappable Errrors

    Lynn,

    There is need.

    You just don't know how it works.

    So, do the exercise and learn something.

    SP will be recompiled every time it reaches the point where temp table is referenced.

    If you...

Viewing 15 posts - 3,556 through 3,570 (of 6,036 total)