 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
neverden
Joined: 02 Dec 2008 Posts: 58
|
|
$$ Marco Problem |
|
I am using beta 5 but I don't think this is a beta issue. I am trying to make a simple snippet using a $$ marco. My end goal is to have $$COLUMS$$ return them all in one line. However here is my first step:
$OBJECT$
$$
declare @cols varchar(max)
set @cols = '$COLUMNS$'
select @cols
$$
and I get this error:
Msg 102, Level 15, State 1, Incorrect syntax near ','.
|
|
Fri Apr 16, 2010 8:32 am |
|
 |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
Re: $$ Marco Problem |
|
Have you tried following the $MARCO$ with the $POLO$ keyword? :) Then everything not included in the results is found in $FISH OUT OF WATER$ Your results may vary.
|
|
Fri Apr 16, 2010 9:50 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Please enter 1 space between quote and $COLUMNS$ macro. Without a space separator it uses adjacent text as prefixes for each value in the generated list
 |
 |
$OBJECT$
$$
declare @cols varchar(2000)
set @cols = ' $COLUMNS$ '
select @cols
$$ |
You may also choose to move $OBJECT$ macro after or inside $$ … $$ to avoid table name being inserted above the columns
|
|
Fri Apr 16, 2010 9:59 am |
|
 |
neverden
Joined: 02 Dec 2008 Posts: 58
|
|
|
|
worked, thanks!
|
|
Fri Apr 16, 2010 2:09 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|