I have a table (MyTable) with the following columns:
Col1: NameID VARCHAR(50) PRIMARY KEY NOT NULL Col2: Address VARCHAR(255)
Data Example:
Name: '1 24' Address: '1234 Main St.'
and i did a full text index on the table after making the catalog using default params.
How can I achieve the following query:
SELECT * FROM MyTable
WHERE CONTAINS(NameID, '1')
AND CONTAINS(Address, 'Main St.');
But my query is returning no results, which doesn't make sense because this does work:
SELECT * FROM MyTable
WHERE CONTAINS(Address, 'Main St.');
and so does this:
SELECT * FROM MyTable
WHERE CONTAINS(Address, 'Main St.')
AND NameID LIKE '1%'
but this also doesn't work:
SELECT * FROM MyTable
WHERE CONTAINS(NameID, '1');
Why can't I query on the indexed, primary key column (Name) when I selected this column to be included with the Address column when setting up the Full Text Index?
Thanks in advance!