Friday, December 12, 2008

CONTAINSTABLE query shows error "..full-text query is too complex"

Problem:
I have found that using the sql ContainsTable statement which finds too many results returns the error message "Too many full-text columns or the full-text query is too complex to be executed".

SELECT * FROM CONTAINSTABLE(mytable,myFullTextColumn,N'"Starbucks *"')

The error message really doesn't tell you that there were too many results (the real problem here ) which caused me to bang my head against the wall for a few hours.

Solution:
Run a query with more details in the search string or change your query so the search string is more specific.

Thursday, December 11, 2008

Google API SpreadsheetQuery doesnt work with at symbol (@)

I hate wasting time on stupid issues... and this was one of them. For the life of me, I couldn't figure out why I could not return a ListEntry when I was searching with an email address.

Problem:
ListQuery Lquery = new ListQuery(listFeedLink.HRef.ToString());
Lquery.SpreadsheetQuery = "user@google.com";

Solution:
ListQuery Lquery = new ListQuery(listFeedLink.HRef.ToString());
Lquery.SpreadsheetQuery = "\"user@google.com\"";


I figured it probably had something to do with the string delimiter, but the odd thing was that the google service would accept the full email address without throwing an error and just return no results. (Probably a bug) Regardless, it is still good to know that the string delimiter for the SpreadsheetQuery is a quotation mark since it isn't well documented.

Tuesday, December 9, 2008

TSD01261: The syntax check failed 'Incorrect syntax near ].' in the batch near '] '

Problem: Database Project fails to build with warning: The syntax check failed 'Incorrect syntax near ].' in the batch near ']. Project also fails to show the exact location of the error:

Source of the Problem:
I've found this to occur when the following two things happen together:
  1. You have a variable defined for the project that isnt set.
  2. You are using an ALTER AUTHORIZATION ON DATABASE statement with this variable.
Fix:
As you would expect, the fix here is to set the variable correctly since the real problem here is that visual studio doesn't tell you where the problem is occurring.