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 2008 Forums
 Analysis Server and Reporting Services (2008)
 How to create job in SQL server management studio

Author  Topic 

zach18
Starting Member

1 Post

Posted - 2011-05-04 : 10:50:07
i am attempting to create a job in a local database. the job is supposed to run a stored procedure that i have on the database. i created the job, add a new step. and then i tried to enter in this code:

@execute_query_database='M2M_ZT',
@query='SET NOCOUNT ON exec sp_uss_Hi-Valley_Chemical';

the error it gives me is the following:
Must declare the scalar variable "@execute_query_database". [sqlstate 42000](error 137)

any suggestions would be very helpful.

Zach



nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-05-04 : 11:46:25
just
SET NOCOUNT ON
exec sp_uss_Hi-Valley_Chemical

ANd you probably don't need the set nocount on

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -