Forum Replies Created

Viewing 15 posts - 61 through 75 (of 99 total)

  • RE: Fiscal years

    PS: I know this uses the 'no join predicate', but the query is based on the 3rd party apps workings - I ran a profile trace to capture what...

  • RE: Triggers

    Thanks. I had read a bit about the 'inserted' pseudo table but interpreted it as being explicitly for inserts, not updates.

  • RE: Junction tables - unique rows across 2 columns

    Thanks both.

    Scott, what's the purpose of FILLFACTOR? Never used it before.

  • RE: Failed install - 2008 Standard

    Thanks. Seems to be getting further this time.

    Why does this happen? As in in refuses to install in the Native Client is 'still' installed.

  • RE: Exclude rows

    Alan.B (9/12/2013)If I understand the original OP correctly (" If something has been credited, the billed item row should be excluded") this would not provide the right answer with this...

  • RE: Exclude rows

    It's a 3 party app that only allows you to credit the bill amount.

    So say you bill 4X £100 separately, when you raise a credit you have to cherry pick...

  • RE: Exclude rows

    Thanks Sean.

    They're not real column names. I think you may have solved it anyway. If not, i'll provide some DDL

  • RE: smallint to hh:mm

    HowardW (8/23/2013)


    Another option:

    DECLARE @units int=177

    SELECT DATEADD(MINUTE,@units*6,CONVERT(TIME,'00:00'))

    This works, but for me it has hh:mm:ss.ms, i.e. 17:42:00.0000000

    Can I get it to just be hh:mm?

  • RE: smallint to hh:mm

    Yes, 17.70 is 17.42.

    For those that have 0 hours, ie 0.48 it errors out saying can't convert varchar to int.

    EDIT: It's not just 0 hours that it does this with....

  • RE: smallint to hh:mm

    Richard Warr (8/23/2013)


    Shouldn't it be 17 hours and 42 minutes?

    SELECT CAST(177/10 AS VARCHAR) + ':' + CAST(177 % 10 * 6 AS VARCHAR)

    should do it.

    Not sure, it's been a...

  • RE: Greater/Less than on text column

    Thanks guys.

    Will have a play over the weekend.

  • RE: Sum Time

    Thanks guys.

    That's given me the starting point I need.

  • RE: Char(9) to Time

    Just in response to those who have mentioned time formats; this is hh:mm only.

  • RE: WHERE > CASE > IN

    Thanks both. Although I didn't exactly copy/paste, with the guidance above this is what works for me;

    WHEREUser_ID = xxxx

    AND MONTH(Date) = xxxx

    AND (MONTH(GETDATE()) < 12 AND YEAR(Date) = YEAR(GETDATE())

    OR MONTH(GETDATE())...

  • RE: WHERE > CASE > IN

    The thing is I only want it to include the next year if the current month is 12.

    So if the current month is Jan-Nov only take dates from this year....

Viewing 15 posts - 61 through 75 (of 99 total)