Thank you for your responses, it seems that I confused some people either by not fully explaining myself or by only using snipits of code. What I am trying to do is in transact SQL, and it is being done to reduce the amount of typing needed to make proper system outputs. Let's say that you want to send out the same information about but only change cetain words within the statement it would be something like this
DECLARE @message varchar( 255 )
DECLARE @variable1 varchar( 255 )
DECLARE @variable2 varchar( 255 )
SELECT @variable1 = 'Betty'
SELECT @variable2 = 'chilie'
SELECT @message = 'Hi ' + @variable1 + ', do you like ' @variable2 + ' before 10:00AM'
SELECT @message
Of course the output would be
Hi Betty, do you like chilie before 10:00AM
where as I would like to do something like this
DECLARE @message varchar( 255 )
DECLARE @variable1 varchar( 255 )
DECLARE @variable2 varchar( 255 )
SELECT @variable1 = 'Betty'
SELECT @variable2 = 'chilie'
SELECT @message = 'Hi %ls, do you like %ls before 10:00AM',
@variable1, @variable2
SELECT @message
And the out put would still be
Hi Betty, do you like chilie before 10:00AM
I know this sounds odd, but think of it this way, you have a table of canned messages, when you come across a problem while processing sopmething you page out the same message. Also, you can leave all of you messages in one place without haveing to split and then re-concatinate the line.
Later jimmY