7> CREATE TABLE #tmpvar
8> (
9> Variable varchar (25) NOT NULL
10> )
11>
12> DECLARE
13> @Variable varchar (25)
14>
15> EXEC ('INSERT INTO #tmpvar VALUES (''my value'')')
16>
17> SELECT
18> @Variable = Variable
19> FROM
20> #tmpvar
21>
22>
23> PRINT @Variable
24> GO
(1 rows affected)
(1 rows affected)
my value
1>
2> DROP TABLE #tmpvar
3> GO
|