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)
 SQL Script Objects

Author  Topic 

leedoolan
Starting Member

12 Posts

Posted - 2002-11-21 : 09:27:22
I have 2 queries:

1. Why when I script a job does it put the character 'N' before any stored procedure parameters,
e.g. EXECUTE @ReturnCode = msdb.dbo.sp_add_job @job_id = @JobID OUTPUT , @job_name = N'sp_Example'.

2. Also is there any way I can start running a procedure in code but not wait until it finishes before carrying on with following commands? I presume I will have to put it in some kind of job.

Thanks,

Lee

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-11-21 : 09:36:32
1. The system procedures usually accept nvarchar parameters, instead of regular varchar, and the N' signifies that the value should be converted to nvarchar as it's being passed.

2. Yep, if you put the procedure into a job, you can start it using sp_start_job. Once it starts the remaining code will execute normally.

Go to Top of Page
   

- Advertisement -