Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Montreal, Canada
    Posts
    151

    Unanswered: Update trigger plz help

    well basically i have a table with 3 columns in a table called TEST like:

    TEST1 TEST2 TEST3
    ------- ------- -------
    NULL NULL NULL

    these columns can allow nulls. What i whant to do with my trigger is do a after trigger and check after the load if a certain column is NULL place a X instead like a flag but only on the columns that are NULL how would i do this.

    plz help

  2. #2
    Join Date
    Jan 2004
    Location
    Montreal, Canada
    Posts
    151
    Ok i got this one never mind

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Code:
    USE Northwind
    GO
    
    SET NOCOUNT ON
    CREATE TABLE myTable99(Col1 int IDENTITY(1,1)
    		, TEST1 varchar(10) DEFAULT('x')
    		, TEST2 varchar(10) DEFAULT('x')
    		, TEST3 varchar(10) DEFAULT('x'))
    GO
    
    INSERT INTO myTable99(TEST1) SELECT 'A'
    INSERT INTO myTable99(TEST2) SELECT 'B'
    INSERT INTO myTable99(TEST3) SELECT 'C'
    GO
    
    SELECT * FROM myTable99
    GO
    
    SET NOCOUNT OFF
    DROP TABLE myTable99
    GO
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •