Forum Replies Created

Viewing 15 posts - 2,746 through 2,760 (of 6,036 total)

  • RE: DATEADD Function not working like I am expecting

    You need to add 1 month to LAST DAY of a month, not to 30th day of month.

  • RE: SELECT doing table scan

    Clustered index on cd.customer_id may help here.

  • RE: Character Length of Byte Data Types

    Chuck Hardy (11/20/2008)


    With integers I guess I could filter out any data with a length of < 10 characters and then check for any outliers that exceed -2,147,483,648 and 2,147,483,647....

  • RE: Abnormal database growth

    Then you stuck with daily shrinking.

    There are only 2 ways to keep place clean - don't litter there or clean it regularly.

    It appears your developers cannot write code which does...

  • RE: Character Length of Byte Data Types

    Chuck Hardy (11/19/2008)


    I've recently created a data validation process that loads this raw data to validation tables. These tables are automatically created by the system and all columns are...

  • RE: Character Length of Byte Data Types

    Quite useless exercise.

    Values 5000000000 and 2000000000 have the same number of characters but one of them is proper int, another one is not.

    It's even more complicated with dates. Same date...

  • RE: Getting oldest/newest record by date

    Derived table must be what you're looking for.

    selectvom100.vst_int_id

    ,vom107.chi_evt_dtm

    ,vom107.order_code_ext_id

    ,vom200.order_code_desc1

    from VOM107_CHILD_ORDER vom107

    INNER JOIN VOM100_ORDER_HEADER vom100 ON vom107.ord_int_id = vom100.ord_int_id

    INNER JOIN VOM200_ORDER_CODE vom200 ON...

  • RE: Displaying NULL as the last row + ORDER BY

    "ORDER BY 5" sorts by column No.5, but when it's in an expression it's treated as a value, not column number.

  • RE: Find Closest Match Data

    jsnv (11/18/2008)


    Hi,

    I have a problem to find closest match data inputted with the one in Table.

    eg. In my Table, i have data like this.

    0010 ...

  • RE: Divide by zero error encountered

    ramadesai108, you don't make any sense, because the rounding happens AFTER dividing.

    You probably need to expose whole statement to let people find where is your real problem.

    Also you could find...

  • RE: Abnormal database growth

    amit (11/17/2008)


    How can this be recovered permanently instead of doing database shrink everyday.

    By firing your current SQL developers and replacing them with qualified ones.

  • RE: Math Formula in a Variable

    SELECT ([CONTRACT_PRICE]*PCP)+([FF&E_AMT]*[PCP]*[TAPP_CONTRACT])

    FROM TableWithValues

    But you're probably asking about writing a translator from one language to another.

    If that's the case then I don't see what it has to do with T-SQL.

  • RE: Math Formula in a Variable

    SELECT Value

    FROM Table

    WHERE Condition

  • RE: To send Mails using SQL

    Isn't another topic next to yours just about that?

  • RE: PRINT in sp with empty output

    Oh, it's so obvious!

    I must've been blind! Or drunk.... 😉

    SET @flds=''

    ....

    SELECT @flds = @flds + ',' + c.name FROM sysobjects o JOIN syscolumns c ON o.id = c.id WHERE (o.xtype='U')...

Viewing 15 posts - 2,746 through 2,760 (of 6,036 total)