Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Problems with SQL statement

  Asked By: Mack    Date: Aug 09    Category: Sharepoint    Views: 704

I am getting an application error when executing a standard SQL
staement in SP. It's a standard SQL string but when I remove the
condition cloumn from the select statement, it throws an error in
the application. The code is like this:

SELECT [MOU Services Provided].Service,[MOU Services
Provided].Director,MOUs.Req_Dept,MOUs.[Contract Type],MOUs.[MOU
type], MOUs.Date_Exp, MOUs.MOU_Num FROM MOUs LEFT JOIN [MOU Services
Provided] ON MOUs.MOU_Num = [MOU Services Provided].MOU_Num WHERE
(((MOUs.[Contract Type])LIKE 'MOU') AND ((MOUs.Status)
LIKE 'Signed')) ORDER BY [MOU Services Provided].Service, [MOU
Services Provided].Director;

When I remove the "MOUs.[Contract Type]" from the SELECT part of the
statement, I get an error ... it works fine running it directly from
the query analyzer and VS does not throw an error. Any ideas?



1 Answer Found

Answer #1    Answered By: Darrel Sexton     Answered On: Aug 09

I had a similar problem.
You might find this site useful:

Didn't find what you were looking for? Find more on Problems with SQL statement Or get search suggestion and latest updates.