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
 SQL Server Development (2000)
 how to write query in sql data base.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-09-25 : 07:24:28
sushma writes "i did n't installed the sql sever in my system and for asp.net 2.0 i am using sql database from add new items,
i wrote a stored procedure like this

create procedur spUsername

@username uniqueidentifier
@password varchar(50)

AS

select * from tblusername order by username

(tblusername is table with usename and password coulmns)

but it is displaying error

"INCORRECT SYNTAX NEAR @PASSWORD"


please help me how to write queries using sql database"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-09-25 : 07:26:00
You have to separate multiple parameters with a comma:

create procedure spUsername
@username uniqueidentifier, @password varchar(50)
AS
select * from tblusername order by username


I suppose you'll actually use those parameters in the code at some point.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-25 : 07:26:16
You missed comma after @username uniqueidentifier:

create procedur spUsername

@username uniqueidentifier,
@password varchar(50)

AS

select * from tblusername order by username


Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -