If you are using SQL 2000, then you can use UDFs. You can make one like this:CREATE FUNCTION GetWords (@Page INT)RETURNS varchar(8000)ASBEGINDECLARE @Words varchar(8000)SELECT @Words = COALESCE(@Words + ', ', '') + WordFROM Metakeywords WHERE ID IN(SELECT WordID FROM PageInfo_MetaKeywords WHERE PageID = @Page)return @Wordsend
and use it inline like SELECT PI.*, Getwords(PI.ID) AS MetaKeyWords FROM PageInfo PI
Please note I have no clue if this'll work. I use SQL 7 and cannot use/test UDFs.[/code]Sarah Berger MCSD