Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock 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.....?

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