• we'd really need the exact error you are getting...and also the exact code you are doing to really help. All i can offere is generalities.

    where is param1 and param2? are they fields, or locally declared variables inside the proc?

    CREATE PROC myProc AS

    BEGIN

    declare @Param1 int

    Declare @Param2 int

    'assign values to variables inside the proc?

    select @Param1 = object_id,@Param2 = colid from sys.columns where object_name(object_id)= 'myTable'

    declare @selVal as integer

    set @selVal = select dbogetCalcvalue(@Param1,@Param2)

    --do more stuff

    END

    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!