Sunday, February 19, 2012

File group as variable

Hi Champs!

How can i create a table on an filegroup that comes from a variable?

Using EXECUTE?

the following does not work:

declare @.var char

set var = 'filegroup'

Create table table]

...

...

ON [@.var]

/Many thanks

Dynamic SQL is the only solution (sp_executesql or EXECUTE).

No comments:

Post a Comment