我不知道如何解決這個錯誤:轉換失敗2008
Conversion failed when converting the varchar value
'SELECT LastName,FirstName FROM ##Results WHERE ##RowNum BETWEEN(' to data type int.
查詢:
SET @s_query = 'SELECT ' + @ColNames1 + ' FROM ##Results
WHERE ##RowNum BETWEEN('[email protected]+'-1) * '[email protected]+' + 1
AND((('[email protected]+' -1) * '[email protected]+' + 1) + '[email protected]+') - 1';
cast @ PageIndex1 to varchar,因爲您要填充字符串s_query –