• your trigger is very close;

    inside a trigger, isntead of using @@identity, you wnat to use the virtual tables INSERTED (or DELETED, where approriate);

    that virtual table allows oyu to handle multiple rows at teh same time, and already has teh new values generated from any identity() columns, calculated columns, etc.

    USE [GroupTables]

    GO

    /****** Object: Trigger [dbo].[AddBarCode] Script Date: 07/15/2013 08:29:07 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    -- =============================================

    -- Author: <Tager, Kevin>

    -- Create date: <7/13/2013>

    -- Description:<Trigger to generate next barcode values on insert>

    -- =============================================

    CREATE TRIGGER [dbo].[AddBarCode]

    ON [dbo].[StudentID]

    AFTER INSERT

    AS

    BEGIN

    -- SET NOCOUNT ON added to prevent extra result sets from

    -- interfering with SELECT statements.

    SET NOCOUNT ON;

    -- Update the barcode numbers of the most recently Inserted Record

    UPDATE [dbo].[StudentID]

    SET [FoodBarcode] = [dbo].[StudentID].[AI] + 3289,

    [LibraryBarcode] = [dbo].[StudentID].[AI] + 880101800707

    FROM INSERTED --INSERTED and DELETED are virtual tables, inside a trigger, with the new/old values

    WHERE [dbo].[StudentID].[AI]= INSERTED.[AI] --[AI] is the identity of the table/PK

    END

    GO

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!