OrthoDocSoft
Programmer
Folks,
I'm just cutting my teeth on stored proceedures and I think you can pass values into them from VB6 code, am I right?
This is what I have as a stored procedure:
Problem is that I get the "underlines" on my "Select" statement (first problem line highlighted above) and when I mouseover, it says "expecting ")", AND, OR"
AND
I get an "incorect syntax error after 'Final' (second problem highlighted). And of course MSSQL Server won't execute the CREATE or ALTER.
Can anyone see the problem?
Thanks,
Ortho
"you cain't fix 'stupid'...
I'm just cutting my teeth on stored proceedures and I think you can pass values into them from VB6 code, am I right?
This is what I have as a stored procedure:
Code:
CREATE Procedure dbo.UpdateORResultsGrid
(@strORName nvarchar(50))
As
SET NOCOUNT ON
Update frozens
Set ORStatus = 'ORResultQueued'
From pathdesk
Inner Join frozens
On pathdesk.UniqueNumber = frozens.UniqueNumber
And pathdesk.Room = frozens.Room
Where (frozens.Room) = @strORName
And (frozens.ORStatus <> 'SurgeryOver'
And (pathdesk.PathStatus) = 'Final'
Select (1st problem here)
frozens.FirstName,
frozens.MI,
frozens.LastName,
frozens.AccountNumber,
frozens.History,
frozens.Specimen,
frozens.SpecimenType,
frozens.Description,
frozens.SpecimenID,
frozens.ORStatus,
frozens.Surgeon,
pathdesk.Gross,
pathdesk.FrozenDx,
pathdesk.DxType,
pathdesk.PathStatus,
pathdesk.Pathologist,
pathdesk.RoomWhereSignedOut,
pathdesk.PhoneWhereSignedOut,
pathdesk.IntercomWhereSignedOut
From frozens
Inner Join pathdesk
On frozens.UniqueNumber = pathdesk.UniqueNumber
And frozens.Room = pathdesk.Room
Where (frozens.Room) = @strORName
And (frozens.ORStatus <> 'SurgeryOver'
And (pathdesk.PathStatus) = 'Final' (second problem here)
Problem is that I get the "underlines" on my "Select" statement (first problem line highlighted above) and when I mouseover, it says "expecting ")", AND, OR"
AND
I get an "incorect syntax error after 'Final' (second problem highlighted). And of course MSSQL Server won't execute the CREATE or ALTER.
Can anyone see the problem?
Thanks,
Ortho
![[lookaround] [lookaround] [lookaround]](/data/assets/smilies/lookaround.gif)