Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 error 209: Cannot use empty object or colmn names?

Author  Topic 

gotafly
Yak Posting Veteran

54 Posts

Posted - 2004-03-30 : 19:38:15
CREATE Procedure GetSingleUser
(
@Email nvarchar(100),
@Password nvarchar(20),
@UserID int OUTPUT,
@appId int OUTPUT,
@lastPage nvarchar(20) OUTPUT
)
AS
DECLARE @c INTEGER
DECLARE @d INTEGER
SELECT @UserID=UserID, @lastPage=lastPage FROM UserInfo INNER JOIN App ON
UserInfo.UserID = App.UserID
WHERE Email = @Email AND Password = @Password
set @c = @@rowcount
IF @c < 1
BEGIN
SELECT @UserID = 0
SELECT @appId = 0
SELECT @lastPage = ""
End
else IF @c > 0
BEGIN
SELECT @appId=appId FROM App
WHERE UserID = @UserID
set @d = @@rowcount
IF @d < 1
BEGIN
INSERT INTO App (UserID) VALUES (@UserID)
set @appId = @@identity
End
End

GO

--

dave

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-30 : 19:47:50
Does it say which line number is having the problem? It will if you run the code inside Query Analyzer. Let us know which line it is complaining about.

Tara
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-30 : 19:52:10
http://dbforums.com/arch/66/2002/6/406764

Tara
Go to Top of Page

TSQLMan
Posting Yak Master

160 Posts

Posted - 2004-03-30 : 21:20:52
Turn off Quoted Identifiers, bet that will work.
Go to Top of Page
   

- Advertisement -