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 |
|
kopzen
Starting Member
34 Posts |
Posted - 2008-06-25 : 10:37:55
|
| HiBelow is my simple stored procedure without Parameters:ALTER procedure [dbo].[aidapr]asSELECTIpage, Rhost, Idevice, Ifield, Ivaluefrom dbo.latest_data;Rhost contains the PC nameSo I wanted to use parameters so that I can get only Specific PC values;So this is what I tried and I get errors:ALTER procedure [dbo].[aidapr]( @Rhost nvarchar (50) = '%')asSELECTIpage , Rhost, Idevice, Ifield, Ivaluefrom dbo.latest_data Where @Rhost Like '*' order by RhostI dont know what Im doing wrong, all I want to do is type the PC name then get all its values |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-25 : 10:41:00
|
| Is this?Where Rhost Like @Rhost+'%' order by RhostMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|