DECLARE @PAGE_TOTAL INT
DECLARE @PAGE_DELETE INT
SET @PAGE_TOTAL = 2
SET @PAGE_DELETE = 0
SET ROWCOUNT @PAGE_TOTAL
SELECT h_name,tel,h_area,product,h_time,commenet, status,s_area,s_name INTO #TEMPA FROM T_CONSULT
ORDER BY seq DESC
SET ROWCOUNT @PAGE_DELETE
IF @PAGE_DELETE > 0 BEGIN DELETE FROM #TEMPA END SELECT * FROM #TEMPA DROP TABLE #TEMPAe
실행하면
[Error] Script lines: 1-9 --------------------------
Incorrect syntax near '@PAGE_TOTAL'.
Msg: 102, Level: 15, State: 1
Server: SYBASE, Line: 3
이렇게 나오네요..
원인을 알수 없어서요
문제가 뭔가요?
|