Skip to main content
9 events
when toggle format what by license comment
Sep 15, 2015 at 18:23 history edited Hannah Vernon CC BY-SA 3.0
improved formatting
Mar 3, 2015 at 11:50 history edited Racer SQL CC BY-SA 3.0
[Edit removed during grace period]
Feb 27, 2015 at 18:51 vote accept Racer SQL
Feb 27, 2015 at 18:49 answer added Aaron Bertrand timeline score: 4
Feb 27, 2015 at 18:48 comment added Racer SQL Thank you very much. I'm telling the programmers to make a Proc, instead a Function.
Feb 27, 2015 at 18:45 comment added Aaron Bertrand You can't use dynamic SQL inside a function (well, aside from this awful hack). The main reason is that functions can only return data and can't have side effects. There is no way for SQL Server to prevent you from passing an insert or an update to sp_executesql (as an aside, that looks like a SQL injection attack vector no matter how you end up implementing it).
Feb 27, 2015 at 18:44 comment added Racer SQL Hello...I think the error is because they're calling SP_EXECUTESQL inside the Function. Am I right?
Feb 27, 2015 at 18:36 history edited Racer SQL CC BY-SA 3.0
added 262 characters in body
Feb 27, 2015 at 18:28 history asked Racer SQL CC BY-SA 3.0