Hi all,
I have a question, the below
sql server script i have running on an asp.net site connected to a sqlserver2k errors out with the following error: "
System.Data.SqlClient.SqlException: Line 10: Incorrect syntax near 'GO'." As a solo programmer from home that does this as a hobby, I think i need a fresh set of eyes on my script as I've scoured through it trying to find out what is wrong. I'm hardly an intermediate sql2k user so thought maybe if someone could be so kind to review my script below, it would help me fix the other procedures that I'm trying to create as well because they throw the same error. This is from a dotnetnuke
website and the {databaseOwner}[{objectQualifier} string placements should be correct as they work in other parts of my
code such as creating the tables.
Any help would be appreciated!
Thx
******************** sql server2k script start********************
create procedure {databaseOwner}[{objectQualifier}Company
Name_GetCredits]
@ModuleId int
as
SELECT ItemId = {databaseOwner}[{objectQualifier}CompanyName_tblReg].ItemId,
ModuleId = {databaseOwner}[{objectQualifier}CompanyName_tblReg].ModuleId,
UserId = {databaseOwner}[{objectQualifier}CompanyName_tblReg].UserId,
UserCredits = {databaseOwner}[{objectQualifier}CompanyName_tblReg].UserCredits
from {databaseOwner}[{objectQualifier}CompanyName_tblReg] with (nolock) left outer join {databaseOwner}Users on {databaseOwner}[{objectQualifier}CompanyName_tblReg].UserId = {databaseOwner}Users.UserId
where ModuleId = @ModuleId
GO
******************** sql server2k script end********************