Declare @.Test1 int
Declare @.Test2 int
Declare @.Query varchar(50)
Declare @.Temp varcahr(50)--Test
Set @.Test1=1
Set @.Test1=0
Set @.Query='something'--Add the column to put in containstable
IF (@.Test1=1)
Begin
Set @.Temp='ID'
EndIF (@.Test2=1)
Begin
Set @.Temp= @.Temp + ',Name'
EndSELECT *
FROM
<table>
INNER JOIN
CONTAINSTABLE (<table>,@.Temp, @.Query) AS KEY_TBL
ON <table>.ID = KEY_TBL.[KEY]
ThanksOnly in Sql Server 2005 (Yukon) that is possible... :/