SP syntax help

Results 1 to 2 of 2

Thread: SP syntax help

  1. #1
    Join Date
    Dec 1969

    Default SP syntax help

    New to the world of stored procedures and need help achieving what must be simple basically my (failing) syntax is this:<BR>CREATE PROCEDURE LastUpdateStatus<BR>@status varchar<BR>AS <BR>SELECT dbo.LastSuccessfulAt.[DateTime], dbo.LastUpdatedAt.[DateTime]<BR>FROM dbo.LastSuccessfulAt, dbo.LastUpdatedAt<BR>GO<BR>if dbo.LastSuccessfulAt.[DateTime] = dbo.LastUpdatedAt.[DateTime]<BR>status = "OK"<BR>else<BR>status = "NOK"<BR><BR>...syntax error line 2 near status<BR><BR>Can someone lead me into the light please... also some URLS for learning SPs from basic through to conditional etc would be great...<BR><BR>jay<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SP syntax help

    The keyword **GO** acts like the "end of file" you are not supposed to have anything after that.<BR><BR>Many links for SP help, to name a few<BR><BR>http://www.sqlteam.com/<BR>http://www.mssqlcity.com/<BR>http://www.sqlservercentral.com/<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts