Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!!! How to execute a string.....?

  • Thread starter Thread starter -
  • Start date Start date
Status
Not open for further replies.

Guest
hi,
i have a question. is there a way to execute a string when there is a function in the string?
here is an example. (try to run this at query analyzer)


declare @teststring varchar(255)
declare @resultstring varchar(255)
set @teststring = 'getdate()'
select @resultstring = exec @teststring

please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top