Forum Replies Created

Viewing 15 posts - 46 through 60 (of 76 total)

  • RE: Looping and scalar value

    I see, thanks. As it's scanning the tally table row-by-row from start to the predicate value, the order of N may be important in some cases (not this example), such...

  • RE: Looping and scalar value

    Thanks, I've used that great article in the past. Most of the examples I've seen for using a tally table return a rowset, such as a CSV splitter. What I'd...

  • RE: Difference between alerts and notifications

    Thanks for the confirmation. I do find the terminology confusing: alerts notify you of events, and jobs have notification on the outcome of running it.

  • RE: 13 x 4 Financial Year

    That's fantastic, thanks! Works a treat.

    Just changed: CASE WHEN T.N % 5 = 0 THEN 364 + 7 ELSE 364 END

    so that it adds on an extra week each 5th...

  • RE: bulk insert from csv file and physical order

    Thanks. My lack of knowledge, I didn't know you could bulk insert into a table with an identity column - I thought that all columns had to match.

  • RE: Finding previous Saturday

    Thanks to all, that's great. Yes, I'm storing these dates in a table for future use.

    Last one, a variation on the same, this time to find future Fridays.

    select @CalendarDate =...

  • RE: Create table problem

    Thanks.

    I've just checked and my two Ref columns could actually be up to 50 wide which I think is the reason I had the clustered index only on the...

  • RE: case statement help.

    "Never, never use MONEY data types; their math is wrong!"

    Bit off topic but I wasn't aware of this and have used MONEY columns occasionally. Could you elaborate and should I...

  • RE: Retrieve Time from DateTime (2005)

    select @newt = dateadd(day, -1 * datediff(day, '01/01/1900', @OrigDT), @OrigDT)

    Seems to do it?

  • RE: Advice on running totals using a cursor

    Just an update, decided to abandon the cursor method for calculating running totals and went straight to the Quirky Update - followed Jeff's article to the letter and it works...

  • RE: Types of UDF

    Imagine that you have 20 rows in the outer query and you need an aggregation of 10-50 related records in another table (TableB) for each of the 20. If...

  • RE: Advice on running totals using a cursor

    I think I've covered that one by rebuilding the running totals from the earliest date in the table that will be affected by the new batch of rows. Of course...

  • RE: Advice on running totals using a cursor

    I'm actually opposed to storing running totals in permanent tables for various reasons we can get into later.

    Given the implications for me, you'd better tell me sooner rather than later....

  • RE: Advice on running totals using a cursor

    Thanks to all for the advice, I'll go away and try to re-write my running total...code will follow if I hit problems!

    There seems to be two issues:

    1. How to calculate...

  • RE: Find previous Saturday and Sunday

    Thanks. I presume it can be done without a calendar table, but on looking at the link provided I can see the advantages of it as I have to do...

Viewing 15 posts - 46 through 60 (of 76 total)