CREATE PROCEDURE Error
I am getting a error in the opening 3 lines:
Here is my code:
Thanks in advance.
CREATE PROCEDURE [sql1] (@Latin int(4))
DECLARE @max int(4), @min int(4), @col3 int(4),@datetime datetime(8);
1and1 MS SQL
Originally Posted by NogDog
ooh...I only have access to MySQL and PostgreSQL, so can't really try it myself.
I'm pretty sure you don't want those square brackets around the procedure name, however?
the code you have in the thread here is incomplete...here is a full example of a stored procedure, which takes 2 parameters (you can add/remove them at will), just follow the syntax
Hope this helps..:-)
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE PROCEDURE proc_myStoredProcName(@variable1 varchar(20),@variable2 int)
-- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements. u can comment it or delete it if not needed
SET NOCOUNT ON;
--your select,update,insert statement below
SELECT id,user_id,login_time FROM somedatabasename.dbo.user_activity WHERE login_time='this works'
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)