SET a local variable from a global variable

  • I want to do the following:

    declare @bigvarchar varchar(1000)

    set @bigvarchar = ?

    However, I get a syntax error when I parse the set command. I've got a string global variable defined as parameter 1.

    How can I do this?

    Thanks in advance!

  • Not quite sure what you mean by 'parameter 1' but:

    declare @bigvarchar varchar(1000)

    set @bigvarchar = @name_of_variable

     

    J

  • Just realised you are talking about DTS. I'll come back to you when I have something.

    J

  • I've not found anything but it seems that you are doing some t-sql statements in the task.  I would suggest converting this to a stored procedure and passing the global variable as a parameter:

    exec my_stored_proc ?

     

    HTH

    J

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply