title: SQL FreeTextTable [Key] Join to VarChar ID
body: <p>I have a search facility on my website which ranks matches using the RANK field on a freetexttable. I have been joining the KEY field to my product IDs with no problem as both a integers. However I have since had to convert my product ID to a varchar in order to start using alpha numeric values. Whatever I seem to do I can no longer get the KEY field to match to the product ID field. This is what I have so far. </p>
  
  <pre><code>USE [database]
  SELECT distinct ft.id, ft.title, ft.was, ft.[desc] AS 
  productdescription, ft.price, ft.sortcost, ft.hidden, ft.discount, ft_IDX.RANK, ft_IDX.[KEY]
  FROM dbo.products as ft
  left JOIN FREETEXTTABLE(products, [desc],'bomber',50) ft_IDX ON CAST(ft.id AS VARCHAR(10)) = CAST(ft_IDX.[KEY] AS VARCHAR(10))
  INNER JOIN [database].[dbo].[product_channel] ON [database].[dbo].[product_channel].[productid] = ft.id 
  WHERE  (ft.hidden = 0) and (ft.superhide = 0) 
  </code></pre>
  
  <p>Also will the KEY field start using alpha numerics when I start using alpha numeric product IDS also? If not then this exercise is probably pointless as my search will never return products with alpha numeric IDs.</p>