Forum Replies Created

Viewing 15 posts - 481 through 495 (of 582 total)

  • RE: Question

    If you want to use TSQL only, you would need to use either a linked server or a remote server with a lot of stored procs with many parameters. I...

    Tim Wilkinson

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

  • RE: How to create dynamic query in Stored Procedure?

    Do you allow them to specify parentheses as well? If not, they are likely to get some unexpected results if they mix AND with OR - especially since AND is...

    Tim Wilkinson

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

  • RE: Question of the Day for 29 Jul 2005

    Answer 1 is correct if you want a necessary (but not sufficient) condition for a BLU - the non clustered index must not be a covering index.

    Answer 2 is correct if you...

    Tim Wilkinson

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

  • RE: datetime manipulation

    These are a bit dirty and make use of implicit conversions but they are probably pretty efficient:

    create function dbo.dateportion (@d as datetime)

    returns datetime

    as

    begin

    return floor(cast(@d as float))

    end

    create function dbo.timeportion (@d as...

    Tim Wilkinson

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

  • RE: HELP RESTORE DROPPED TABLE!!!

    So OS files on your database server aren't backed up?

    Tim Wilkinson

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

  • RE: HELP RESTORE DROPPED TABLE!!!

    If you haven't got SQL backups (inc. tran log backups as in previous post) to cover the period immediately before the incident (but surely you must have???), your only hope...

    Tim Wilkinson

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

  • RE: Update on a huge table

    Previous poster's point is a good one, arising from the problem of searching on a derived value. Given that the data presumably has a high cardinality ( many different values),...

    Tim Wilkinson

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

  • RE: Syntax help requested

    The syntax quoted from BOL shows that the first three params are mandatory: they aren't contained in square brackets.

    Tim Wilkinson

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

  • RE: N-Many Relationship

    Phone nos should be all different (at least within each group) in example data.

    Tim Wilkinson

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

  • RE: N-Many Relationship

    Repeated data in NoelD's example:
    Table_Pos_Dep_Phone
    AssocID DepID PosID fk_PhoneID 
    1D1P1228374
    2D1P1232527
    3D1P2234222
    4D1P2123423
    5D1P2123423
    6D2P1123423
    7D2P1123423
    8D2P3123423
    9D2P3123423
    10D2P3123423
    
    I'd suggest something like:
    tblDept:
    DeptID (PK)
    Description e.g. 'Finance'
    ...
    tblJob:
    JobID (PK)
    Description e.g. 'Clerical Assistant'
    ...
    tblPost:
    PostID (PK)
    DeptID (FK)
    JobID (FK)
    Description (non-normal data for illustration only) e.g. 'Finance Clerical Asst...

    Tim Wilkinson

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

  • Viewing 15 posts - 481 through 495 (of 582 total)