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.
| Author |
Topic |
|
new_developer
Starting Member
18 Posts |
Posted - 2010-11-09 : 08:28:48
|
hi for alli try to write stored procedueto retrive data from tableCREATE PROCEDURE viewdocument { @name nvarchar(50) } select * from document where title like '@name' but it give me message errorincorrect Syntax near '{'.any one can tell me what is the error hereand thanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-11-09 : 08:30:15
|
replace { and } by ( and ) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-11-09 : 08:51:23
|
| Also replaceselect * from document where title like '@name'by select * from document where title like @name+'%'MadhivananFailing to plan is Planning to fail |
 |
|
|
new_developer
Starting Member
18 Posts |
Posted - 2010-11-09 : 08:58:34
|
| My friend who I have worked I have said to me, buti get another error error message i getincorrect syntax near the keyword 'select' |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-11-09 : 09:00:56
|
create proc ...(var)ASselect ... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
new_developer
Starting Member
18 Posts |
Posted - 2010-11-09 : 14:51:22
|
| friends thank you it workes |
 |
|
|
|
|
|