• You could populate a table with the test values you want to us, then process from it in a loop or by using GO <#_of_test_runs>, which I used below just for the heck of it :).

    CREATE TABLE #test_run_values (

    run# int PRIMARY KEY,

    DE1 varchar(100) NOT NULL,

    DE2 varchar(100) NOT NULL,

    has_been_processed bit NOT NULL

    )

    --populate this table however you need to to get the

    --"random" values you want

    TRUNCATE TABLE #test_run_values

    INSERT INTO #test_run_values

    VALUES(1, 'A', 'B', 0),

    (2, 'C', 'D', 0)

    SELECT * FROM #test_run_values

    --the GO below **MUST** be present.

    GO

    DECLARE @run# int

    DECLARE @DE1 varchar(100)

    DECLARE @DE2 varchar(100)

    SELECT TOP (1) @run# = run#, @DE1 = DE1, @DE2 = DE2

    FROM #test_run_values

    WHERE has_been_processed = 0

    ORDER BY run#

    SELECT @DE1 AS DE1, @DE2 AS DE2

    UPDATE #test_run_values

    SET has_been_processed = 1

    WHERE run# = @run#

    SELECT *

    FROM dbo.BlaBla(@DE1, @DE2)

    GO 2

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.