
October 30th, 2012, 07:58 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 1
Time spent in forums: 11 m 18 sec
Reputation Power: 0
|
|
Incorrect syntax near the keyword 'FROM'
Hello,
I have this code:
Code:
DECLARE @nb int, @date smalldatetime
SELECT @nb= ( COUNT (*)
FROM TABLE
WHERE code = @code )
SELECT @date = ( MIN (date)
FROM TABLE
WHERE code = @code )
END
When I execute it, I have this error:
Code:
Incorrect syntax near the keyword 'FROM'.
How do you know how to correct it?
Thanks.
Last edited by Skyfall : October 30th, 2012 at 08:03 AM.
|