• ok ,lets i explain my requirement....

    ALTER PROC Multiple_Instance_Value

    (

    @compnay_ID INT,

    @Instance_ID NVARCHAR(MAX)

    )

    AS

    BEGIN

    SELECT instance_id,address,company_name,status FROM cmytbl

    WHERE company_ID =@company_ID AND instance_id = @instance_id

    END

    for exemple we passing the input parameter as

    EXEC Multiple_Instance_Value @company_id = 201,@instance_id = '1011,1012,1013,1014,1015,1016,1017'

    I want output as

    insatnce_id: 1011, address: 3 way line, ABC private ltd,1

    insatnce_id: 1012, address: 4 way line, DEF private ltd,1

    insatnce_id: 1013, address: 5 way line, GHI private ltd,1

    insatnce_id: 1014, address: 6 way line, JKL private ltd,1

    insatnce_id: 1015, address: 7 way line, MNO private ltd,1

    insatnce_id: 1016, address: 8 way line, PQR private ltd,1

    In the above we get the each output table by means of instance_id what we passed in the @input parameter of @instance_id.

    The output table is not fixed it may vary deponds on the @instance_id.

    I think you may understand my requirement,if so please help me out,am waiting for the solution,if any queries please let me know..........