astrodestino
IS-IT--Management
Hi!
I'm do not program SQL and I need to create a stored procedure from this sql syntax:
With some help from you guys I got this syntax:
But I get this error when I try to create it:
Incorrect Syntax Near 'GO'
What am I doing wrong?
Tnx for your help!!!
I'm do not program SQL and I need to create a stored procedure from this sql syntax:
Code:
varDate = date()
varDay = DatePart("d",varDate)
varMonth = DatePart("m", varDate)
varYear = DatePart("yyyy", varDate)
"SELECT * FROM adefemerides where mes="&varmonth&" and dia=" &varday &" and ano="&varYear
With some help from you guys I got this syntax:
Code:
CREATE PROCEDURE sp_adefemerides AS
select *
from adefemerides
where mes = month(getdate())
and dia = day(getdate())
and ano = year(getdate())
go
But I get this error when I try to create it:
Incorrect Syntax Near 'GO'
What am I doing wrong?
Tnx for your help!!!