Forum Replies Created

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

  • RE: Trigger Question

    There is an undocumented way to run a job every 10 seconds.

    Here is an example how we use it:

    DECLARE @nJobId    AS UNIQUEIDENTIFIER

    DECLARE @szJobName AS VARCHAR(1000)

    DECLARE @DBName as VARCHAR(1000)

  • RE: How to ignore errors inside triggers

    refer to my post about 2 above this one.  I addresed all of this for you.

  • RE: How to ignore errors inside triggers

    your method wont work the way you have it setup...inserted and deleted are multiple row tables, not single row tables.  You might have a @@rowount > 0 when updating, but...

  • RE: Nested stored procedure: Parent name?

    yeah if you can change all the procs interfaces, just pass the calling proc's name.  If you can't, then you can store them in a table.

     

  • RE: Logic to determine Gender based on FirstName

    i agree that its not possible to get right, but if you give me your email address, I have 2 text files that list the top most often used male...

  • RE: Speedy Sub-Queries??

    cant you rewrite this:

    left outer join (select ORDER_ID, DIRECTORY_ID, ID from t_MTSTM_STOP where ACTIVE = 1 and STOPTYPE_ID = 8583) SHIPSTOPTABLE on SHIPSTOPTABLE.ORDER_ID = ord.ID

    like...

  • RE: Nested stored procedure: Parent name?

    you could implement a stack in a table with fields @@SPID, iLevel, procname in it and refer to that.  Make a sp to push a procname on entry and  then...

  • RE: How to ignore errors inside triggers

    Woiuld this work?

    UPDATE MirrorTable SET

      a = inserted.a

      b = inserted.b

      c = inserted.c

    FROM Inserted

    WHERE Inserted.id = MirrorTable.id

    INSERT INTO MirrorTable (id,a,b,c,d)

    SELECT id,a,b,c,d

    FROM Inserted

    LEFT JOIN...

  • RE: Date with No time...

    What I found out when testing performance is that the amount of time spent in the TSQL interpreted code takes all the time.  I tested against a table with 86,000...

  • RE: Date with No time...

    This is the fastest way i have found

    (CAST(CAST(GetDate() as FLOAT) AS INTEGER) AS DATETIME)

    if you want to do calculations or find things in the same day you dont need...

  • RE: UNIQUE CONSTRAINT limitation. Expressions dont work?

    Thanks 4500!

    We tried this:

    j AS (CAST(jStart AS INT))

    And you get this:

    Server: Msg 1933, Level 16, State 1, Line 1

    Cannot create...

  • RE: UNIQUE CONSTRAINT limitation. Expressions dont work?

    thanks remi

    We need the MS in the date field, so we basicly have to add another field to hold that day.  Which is ok i guess:

    CREATE TABLE...

  • RE: Create a View with OPTION (FORCE ORDER)

    Thanks for all the replies.  I guess there is no way to do it.

    We have a database with millions of rows in many different related tables.  It is a workflow...

  • RE: Create a View with OPTION (FORCE ORDER)

    -- this works

    SELECT c.Name + '.' + o.Name AS Foo

    FROM SysColumns c

    INNER JOIN SysObjects o ON c.id=o.id

    OPTION (FORCE ORDER)

    GO

    -- This works

    CREATE VIEW Test1 AS

      SELECT c.Name + '.' + o.Name...

  • RE: Jobs - Calling a stored procedure every 10 seconds

    we were thinking the trigger on the "idQueue" field could add an item to an mts queue.  Then the stations would get the work from the mts queues.  Any thoughts?

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