Forum Replies Created

Viewing 15 posts - 256 through 270 (of 582 total)

  • RE: convert blob to table

    Google: TSQL split string

    There are loads of threads about stuff like this.

    Have you considered using XML, or not doing this at all(!)?

    I hope you aren't using a production (rather...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: How can I do a bulk update from Table1 to Table2?

    update t2
    set description = t1.description
    from dbo.Table1 t1
    join dbo.Table2 t2
    on t1.id = t2.id

     

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Need to TUNE SQL Statement

    --I suspect you're comparing chars to dates, which would slow things down.
    --also don't understand why you are looking only at these dates. But you...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Casting error

    >Bigint is 8 byte, not 16.

    ah yes, good point. I thought those mushrooms were a funny shape.

    >Varchar can NEVER be more effective than numeric. It uses only 26...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Single Quote and Double Quote

    I remember in v6.5 in which quoted_identifier was off by default, I used to use single quotes for the outermost layer, then doubles for embedded quotes. So...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Length of a string

    And you have to divide the datalength() output by 2 for unicode (nchar etc.) strings.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: convert PL code to TSQL

    That won't help you.

    BTW, are you still there?

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Deadfull Union - Slow

    Can you post the individual statements, with their WHERE clauses, and the select from the view, with its WHERE clause? There shouldn't be any significant difference in execution times.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Performance with Linked server and text field

    This is unequivocally better than the solution those MS types came up with:

    select s.*,t.* from s

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Insert missing rows

    declare

    @calendar table(date as cast(i as

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Can it (3D arrays) be done if I upgrade to SQL 2005 ?

    Yes, I believe CROSS APPLY does it but you force row-by-row processing of the outer recordset, so you might want to consider using joins instead if possible. If your UDF is an...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Anyone have ideas how to solve deadlock problems

    >why would you build a system that requires blocks of keys to be contiguous? 

    this did actually happen. I rebuilt it becuase it was my job. I didn't specify it, needless...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: convert PL code to TSQL

    If by 'new to the programming world' you mean new to SQL or even programming in general, you are completely ****ed unless by some miracle the untested rough attempt below...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: How to retrive the Table Description

    closest is:

    exec

    sp_help N'EMP'

    or select from a system view/table (depends on SQL version) with N

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • RE: Anyone have ideas how to solve deadlock problems

    nileshsane: Every SQL statement uses an isolation level. Maybe Jeff means: only reports should use READ UNCOMMITTED since they are generally running in a read-only environment?

    BTW, using NOLOCK means you...

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

Viewing 15 posts - 256 through 270 (of 582 total)