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)
 query across servers

Author  Topic 

Dirty_Howi
Starting Member

12 Posts

Posted - 2005-04-06 : 11:14:01
we have 2 sql servers one production and one development, i need to create a sp to pull 5 bits of data from a table on the production server, so that i can match it with data on the developement server and do some other things,

i have

CREATE PROCEDURE [dbo].[spStaffIntermediate]
AS


SELECT SSN, STAFFCODE, POSSTAT, POSSEPDT

FROM csh12.employees.dbo.STAFF

WHERE (POSSTAT='04') AND (POSSEPDT IS NULL)

GO


it complains about the ansi_nulls and ansi_warnings not being set, i added

SET ANSI_NULLS ON and
SET ANSI_WARNINGS ON to no avail.

HELP

When i'm right, no one remembers, when i'm wrong no one forgets.

mr_mist
Grunnio

1870 Posts

Posted - 2005-04-06 : 11:49:12
Where have you set them? You need to put them in front of the CREATE PROC.

Or, just type your create proc into query analyzer instead.

-------
Moo. :)
Go to Top of Page

Dirty_Howi
Starting Member

12 Posts

Posted - 2005-04-06 : 11:51:18
create procedure must be the first statement in a query batch... <--new error

When i'm right, no one remembers, when i'm wrong no one forgets.
Go to Top of Page

satishdg
Starting Member

10 Posts

Posted - 2005-04-07 : 02:22:40
Hi larry
first type this
SET ANSI_NULLS ON and
SET ANSI_WARNINGS ON to no avail.
Press F5
Now remove above lines and compile u r procedure.

Satish
Go to Top of Page
   

- Advertisement -