I need to perform a select statement across servers... this statement works in query analyzer but not as a procedure. It tells me I need to enable the ANSI_NULLS and ANSI_WARNINGS options when put into a procedure (which it looks like i did!) I think it has something to do with this GO as the stored procedure isn't recognizing it. I tried even building it as a string and executing. Any ideas as to enable this in a procedure?
CREATE PROCEDURE TESTING AS
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GO
SELECT * FROM MIDSERV.DB000.dbo.tblcustomer
select * from #tableTake out GO statements after SET and re-run the SP.|||Originally posted by Satya
Take out GO statements after SET and re-run the SP.
CREATE PROCEDURE TESTING AS
SET ANSI_NULLS ON
SET ANSI_WARNINGS ON
SELECT * FROM MIDSERV.DB000.dbo.tblcustomer
I get the same error telling me to enable ansi_nulls and ansi_warnings...|||Aren't the ANSI_NULL and ANSI_WARNING options to has to be set at connection level?
i belive (thought not so sure) that you cannot use it inside a stored procedure, you just have to call it BEFORE you call your stored procedure.|||that is a GOOD CALL!!!!!!!!!!!
You wouldn't know how about to set those at connection level would you? I tried doing it in a job scheduled in EM and it didn't work too well
First transact-sql statement in job:
set ANSI_NULLS ON
SET ANSI_WARNINGS ON
GO
Second transact-sql statement in job
exec procedure1
also tried combining
set ANSI_NULLS ON
SET ANSI_WARNINGS ON
GO|||mmm...do have already tried to remove the "GO" statement?
to set an option at connection level you just have to call it BEFORE anything else you want to execute with that options activated.
now i cannot try, but i'll make a test as soon as i get a SQL Server console under my hand :-)sql
Showing posts with label tells. Show all posts
Showing posts with label tells. Show all posts
Friday, March 23, 2012
Monday, March 12, 2012
Error occurred retrieving child nodes
AS 2005 April CTP.
I have deployed a solution which works fine in other computer. But know in cubes with calculated measures didn't work.
It tells me The dimension '[Measures]' was not found in the cube when the string [Measures].[My Calculation], was parsed.
If I remove the calculated measures the cube works fine but of course I need the calculations.
Any ideas?
Thanks in advance.I'm thinking that it's a problem with collation. I put view code in calculations and change [MEASURES] with [Measures] and it works.
But in AS isn't defined CASE SENSITIVE.
What can I do?
I have deployed a solution which works fine in other computer. But know in cubes with calculated measures didn't work.
It tells me The dimension '[Measures]' was not found in the cube when the string [Measures].[My Calculation], was parsed.
If I remove the calculated measures the cube works fine but of course I need the calculations.
Any ideas?
Thanks in advance.I'm thinking that it's a problem with collation. I put view code in calculations and change [MEASURES] with [Measures] and it works.
But in AS isn't defined CASE SENSITIVE.
What can I do?
Subscribe to:
Posts (Atom)