Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)

  • RE: Table Update Problem

    The user definitely has permissions because the total number of eligible records prior to running the cursor was 15,261 and after it was 14,441, which means it updated 820 records.

    As...

  • RE: DTS to Excel and recreating sheets each month

    OK, well that's a simple answer.  Thanks!

  • RE: DTS to Excel and recreating sheets each month

    Thanks!  I have one more question though.  If the tabs already exist, how do I get rid of them so that I can recreate them?  DROP TABLE doesn't seem to...

  • RE: Trigger to stop row from being updated

    Thanks, but I still have the question as follows.

    Let's say there is no other value being inserted but the description field.  If I use this statement:

    UPDATE address

    , description =...

  • RE: Trigger to stop row from being updated

    OK, thanks.  One other question.  Should I do this for every field in the table that might be updated because at times, only the address name or the zone would...

  • RE: Trigger to stop row from being updated

    OK, this is all new to me, so please bear with me.  How do I do the update in the ELSE?  I looked at the sample and don't see where...

  • RE: Trigger to stop row from being updated

    I tried the following trigger:

    create TRIGGER trg_u_address ON Address INSTEAD OF UPDATE

    AS

    -- Make sure that all of the data meets the CHECK constraint.

    IF EXISTS(SELECT *

              FROM inserted

              WHERE id =...

  • RE: Trigger to stop row from being updated

    Could you give me a sample "Instead of" trigger?

    thanks!

  • RE: Setting dynamic Order By in Stored Procedure

    IN addition, the procedure I wrote has some columns defined as follows:

    (select count(distinct id) from customers where id in (select customerid from orderheader where date_delivery between @startdate and @enddate and...

  • RE: Setting dynamic Order By in Stored Procedure

    I've given this a try and here is the case statement I've come up with for the order by clause:

    <procedure declaration and code here then the order by...>

    order by

    (

    case...

  • RE: Setting dynamic Order By in Stored Procedure

    Thanks for the advice. The only part I did not understand how to accomplish is using the CASE statement to create the ORDER BY clause. I'd love to...

  • RE: Counting shifts

    Actually, your approach is similar to the one I'm using that isn't returning the proper information. Consider the following (real) sample data:

    1 2003-08-10 00:00:00 1899-12-30 12:15:00

    2...

  • RE: Counting shifts

    Another good idea, but that won't work because the time_targetdelivery column has different values in it and the grouping won't help me determine the shift splits.

  • RE: Counting shifts

    That would not work. It would return the following information:

    Monday breakfast: 3

    Monday lunch: 2

    Tuesday lunch: 2

    Tuesday dinner: 5

    Wednesday dinner: 6

    Thursday lunch: 3

    Friday dinner: 8

    TotalCount = 24

    I should also...

  • RE: Complex Query -- Help needed

    I fixed the error and the CASE way works great! Thanks alot to everyone who replied. I learned alot more about how to create these complex queries. ...

Viewing 15 posts - 1 through 15 (of 16 total)