• Please next time provide DDL and INSERTs like this:

    CREATE TABLE #Building_Information (

    Building_Name VARCHAR(50)

    ,Subnet VARCHAR(15)

    );

    INSERT INTO #Building_Information (Building_Name, Subnet)

    VALUES ('Building 1', '192.168.1.%'),

    ('Building 2', '192.168.2.%'),

    ('Building 3', '192.168.3.%')

    SELECT * FROM #Building_Information

    CREATE TABLE #Device_Information (

    DeviceNum VARCHAR(50)

    ,IP_Address VARCHAR(15)

    );

    INSERT INTO #Device_Information (DeviceNum, IP_Address)

    VALUES ('Device1', '192.168.1.2'),

    ('Device2', '192.168.1.3'),

    ('Device3', '192.168.2.2'),

    ('Device4', '192.168.3.1'),

    ('Device5', '192.168.3.2'),

    ('Device6', '192.168.3.3')

    SELECT * FROM #Device_Information

    Now what do you mean by "multiple value pass"? What is the value of @Subnet when error occures?

    --Vadim R.