Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ikhuram
Starting Member
28 Posts |
Posted - 2004-05-28 : 03:08:14
|
| CREATE PROC usp_test_report @lot_list text, @wafer_list varchar(8000), @test_nbr varchar(8000)ASDECLARE @sql varchar(8000)SET QUOTED_IDENTIFIER OFFSET ANSI_WARNINGS OFF SET @sql = " SELECT test_summary.test_name, " +" test_summary.execution_count, test_summary.failure_count, " +" test_summary.alarm_count from test_summary join lot" + " on test_summary.lot_sequence = lot.lot_sequence " +" join wafer on test_summary.wafer_sequence = wafer.wafer_sequence" +" WHERE lot.lot_sequence IN " + @lot_list +" and wafer.wafer_sequence IN " + @wafer_list +" ORDER BY test_summary.failure_count DESC"+" test_summary.alarm_count"+ " DESC" print @sqlEXEC(@sql)I GOT ERROR:Invalid operator for data type. Operator equals add, type equals text.Please tell me how to fix this problem as my parameter can have more than 8000 characters. |
|
|
Pethron
Starting Member
10 Posts |
Posted - 2004-05-28 : 05:07:53
|
| Isn't there an error because the " instead of a '? |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-05-28 : 09:27:57
|
| At a glance..........you are also missing a comma after the 1st DESCAlso @lot_list shouldn't be TEXT....VARCHAR/CHAR is required......you can't mix data-types when building this type of statement....or else you need to do a 'convert' |
 |
|
|
|
|
|