Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Solution to COLLATE post from yesterday

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-14 : 08:42:40
Steve writes "If your interested, the solution is to place the following collation stmt in the 2nd query after each varchar field:

COLLATE SQL_Latin_General_CPI_CI_AS

This is because the text fields returned from Index Server are nvarchar fields and therefore have a different collation.



SELECT 'idxsrv' as DocType, *
FROM OpenQuery( FileSystem, 'SELECT DocTitle, vpath, filename, size,
write, characterization, rank FROM SCOPE() WHERE CONTAINS( Contents,
''beer'' ) ' )
UNION SELECT 'bulletin' "DocType", '' COLLATE
SQL_Latin1_General_CP1_CI_AS "DocTitle", '' COLLATE
SQL_Latin1_General_CP1_CI_AS "vpath", '' COLLATE
SQL_Latin1_General_CP1_CI_AS
"filename", 0 "size", '' "write", '' COLLATE
SQL_Latin1_General_CP1_CI_AS "characterization", KEY_TBL.Rank
"rank"
FROM tblBulletinBoard bb INNER JOIN CONTAINSTABLE( tblBulletinBoard,
*, 'beer' ) AS KEY_TBL ON bb.BulletinId = KEY_TBL.[KEY]
ORDER BY rank DESC"
   

- Advertisement -