Forum Replies Created

Viewing 15 posts - 286 through 300 (of 1,217 total)

  • RE: Trigger prob

    Log table is just MY name for a table into which you insert rows from a trigger. It is not a system table. You did not post the trigger, so...

  • RE: Trigger prob

    Insert trigger is fired every time when you insert into the table.

    If you want to know when it was fired, make column date_created in your log table. Then make the...

  • RE: Trigger prob

    Sorry, subu, I don't get it... are you creating triggers inside of stored procedure? Or are they already present in your table and the procedure should fire them? What "fired...

  • RE: Triggers - Very urgent

    If you want to insert into the log all rows that were updated (regardless of whether something was changed or not), then your trigger should work. If you only want...

  • RE: Filter using count()

    " but i get an error" ... what a wonderful definition of problem. Makes it really easy to find solution.

    Here are some more ways how to ask for support (from...

  • RE: Performance Tuning Guide

    Great idea, let me know when and where I can order that book .

  • RE: date functions

    Sure Lynn, I wasn't trying to tell that your method is wrong or anything like that... just that I personally prefer to avoid SET DATEFIRST. It is always good to...

  • RE: date functions

    Well, I admit that I didn't have patience to analyze Lynn's code, but it does not look simpler than the code I posted, and it uses SET DATEFIRST... so I...

  • RE: I need to dynamically generate a list of days in a given date range

    Look for the post (reply) by Jeff Moden here

  • RE: I need to dynamically generate a list of days in a given date range

    You probably misunderstood what Sergiy meant... you should create permanent Numbers (or Dates) table, once and for ever. Then you can use it in such queries as you described.

  • RE: Should I drop and recreate a stored proc everytime?

    Well, it probably depends on environment. If you write a script that will apply changes in a procedure to several databases (like when several clients use "copies" of the same...

  • RE: Should I drop and recreate a stored proc everytime?

    I'm a bit confused... Are you writing some stored procedure that modifies another stored procedure and then runs it?

    Or are you asking whether you should drop and recreate a procedure...

  • RE: SQL for calculating count max based on probablility

    Try this for starters:

    SELECT a.deptname, c.deptname, COUNT(*)

    FROM TableA a

    JOIN TableC c ON c.userid=a.userid

    ORDER BY 1, 3 DESC

    It does not solve the fact that once a department is linked, it can't...

  • RE: SQL for calculating count max based on probablility

    I'll try to repeat what I have understood... correct me where I'm wrong.

    You have a table "old" that lists all employees, and to which department they belong.

    You have a table...

  • RE: date functions

    You can do it using DATEADD and DATEDIFF functions, but how exactly, that depends on what should happen when you run the query on Wednesday (or with a day that...

Viewing 15 posts - 286 through 300 (of 1,217 total)