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 |
|
suarezst1984
Starting Member
16 Posts |
Posted - 2009-05-06 : 15:44:32
|
| Ican't see anything wrong with this part of the stored procedure but I still get an error "Incorrect Syntax near keyword "and" 'IF (@pricestart <> 0.00 OR @price_end <> 10000.00) AND @shortTerm = 0BEGIN SELECT @searchString = @searchString + ' AND ((Cast(sfProducts.prodPrice AS float) BETWEEN ' + CAST(@pricestart AS varchar) + ' AND ' + CAST(@price_end AS varchar) + ' AND sfProducts.prodSaleIsActive = 0) OR (Cast(sfProducts.prodSalePrice AS float) BETWEEN ' + CAST(@pricestart AS varchar) + ' AND ' + CAST(@price_end AS varchar) + 'AND sfProducts.prodSaleIsActive = 1)) 'END |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|