Forum Replies Created

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

  • RE: Arithmetic overflow error converting numeric to data type numeric.

    decimal(9,5) means the highest number you can do is 9999.99999

    The 9 includes the 5 digits to the right of the point.

  • RE: Two select statements, need one result

    So you want to combine a figure for the month to date with a figure for yesterday? I assume you don't want your month-to-date receipts broken down by day. You...

  • RE: Return Value Not Returning

    @phq9_order_date is null

  • RE: Function call with field from a table as parameter

    select h.*
    from historic_table h
    join (
          select keysegment1, min(keysegment2) keysegment2 
          from Historic_table h
          where keysegment1 = @KS1

    May 21, 2006 at 2:44 pm

    #639151

  • 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...

  • 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...

  • 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...

  • 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...

  • RE: HELP RESTORE DROPPED TABLE!!!

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

  • 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...

  • 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),...

  • RE: Syntax help requested

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

  • RE: N-Many Relationship

    Phone nos should be all different (at least within each group) in example data.
  • 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...

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