什么是上述错误,请更正SQL异常(附近有语法错误)')
string cmd = @"SELECT * FROM [tbl_students] WHERE [email protected]
AND branch_id IN(" + branchId + @")
AND (@firstYrPercent is null OR first_year_percent>[email protected]
AND (@secondYrpercent is null OR second_year_percent>[email protected])
AND (@thirdYrPercent is null OR third_year_percent>[email protected])
AND (@finalYearpercent is null OR final_year_percent>[email protected])
AND (@currentDegeePercentage is null OR current_degree_percent>[email protected])
AND (@passoutYear is null OR passing_year>[email protected])
AND (@currentBacklog is null OR current_backlog<[email protected])
AND [email protected]
AND (@eGap is null OR gapin_education<[email protected])
AND (@highSchoolPercentge is null OR highschool_percentage>[email protected])
AND (@higherSchoolPercentage is null OR ssc_percentage>[email protected])
AND (@grauationPercentage is null OR graduation_percentage>[email protected])
AND (@diplomaPercentage is null OR diploma_percentage>[email protected])
AND (@noOfAtkt is null OR number_of_ATKT<[email protected])
AND (@date is null OR DOB>[email protected])";
可能的重复[请纠正我与SQL查询](http://stackoverflow.com/questions/3499381/pl易于纠正与我的SQL查询)**和** http://stackoverflow.com/questions/3499584 – gbn 2010-08-17 07:05:21