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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return values from Exec (select...) 1

Status
Not open for further replies.

buddafish

Programmer
Apr 26, 2002
478
US
All,

I am attempting to return the results of an Exec ('Select..') statement. In short, I am passing in a field name in a UDF and have success executing the sql statement, but can only view the result in the 'results' pane. Here is the statement that works:

exec ('SELECT max(' + @FldName + ')FROM root_SCRCVC')

What I would like to do is get the result of this statement(datetime) and return this from my function i.e.
Return @ret.

Any suggestions here?

Thanks in advance -
Scottie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top