Forum Replies Created

Viewing 15 posts - 256 through 270 (of 458 total)

  • RE: Creating a trigger using Database Mail

    In 2005 this really should be accomplished by using service broker, IMHO. It's a lot more complicated but because it uses a queuing system the rest of your transaction...

  • RE: Third party applications

    I've found a number of vendors have limited or not well published support for windows authentication via a dedicated service account. Usually you have to work with them a...

  • RE: schedule a job to run twice daily

    It should run twice...

    I'd just add two seperate schedules to the job to be sure. Create one schedule for once a day at 6:15, then create another for...

  • RE: Those cursed cursors

    Lee-

    It sounds like what you're talking about can be done without a cursor and I'd echo that you should try other approaches first. Can you perhaps post what the...

  • RE: Constraint Multiple Columns: How To

    You could use a trigger...

    CREATE TRIGGERt_my_tableON my_table

    FOR INSERT, UPDATE

    AS

    BEGIN

    IF EXISTS (

    SELECT 1

    FROMmy_table f

    JOININSERTED i

    ONf.email = i.email

    ANDf.password = i.password

    ANDf.UID i.UID

    )

    BEGIN

    ROLLBACK TRAN;

    Print ('No.. bad!')

    -- Raiserror or do something else....

    END

    END

  • RE: Question of the Day for 16 Jan 2007

    I've seen several questions in the past week or two which have reminded me of something...

  • RE: Fuzzy logic in tsql

    You might want to look into using the SOUNDEX function. I would recommend you actually look into (if you can), Ken Henderson's "A Better SOUNDEX()" from his book The...

  • RE: When To Use Cursors

    When I first started out I was strongly advised to avoid using cursors/WHILE loops at all costs. I still agree with that a great deal, but they're a tool....

  • RE: Using CASE in another CASE Statement?

    Why not use AND?

    CASE

    when (DateDiff(mm,sxsd_svc_startdttm, @RevEnd)+1) < 0 AND something_else = xyz then 0

    else (DateDiff(mm,sxsd_svc_startdttm,@RevExpStart)+1)

    End as...

  • RE: DBCC INDEXDEFRAG vs. DBCC DBREINDEX

    There's no way to quickly tell you everything you probably should take into account with this, but I'll give it a go.

    To defrag a table you rebuild or create (if...

  • RE: Two tables in two databases

    Short Answer: No

    Long(er) Answer: Programmatically it can be done.  Most people use triggers to implement in my experience.  It's kind of kludgy, IMHO, but it can be done.

  • RE: data conversion Error in update query

    Can you post the definition of rptpxa2 which is referenced in the query?  Your problem may be in the way you handle the rptpxa2.DCode column.  In your query you treat...

  • RE: Primary/Foreign Key Constraints.Relations

    You can probably query sysobjects where xtype is in the primary/foreign key constraints (check BOL for the code) and join against sysdepends.

    Sorry, not near a SQL server right now or...

  • RE: Indexing in SQL Server 2005

    Yup... see my comment two lines down:

    Unnecessary indexes can force the query processor to evaluate more before deciding on an optimum execution plan, can slow down transactional processing and can...

  • RE: Indexing in SQL Server 2005

    (post-coffee)

    Wait, that's a function...  try APPLY.

Viewing 15 posts - 256 through 270 (of 458 total)