I have:
SQL Server 2000
.NET/ADO
C#

I have a shared server setup, and am trying to modify some UDFs to work with both servers. I changed...

INSERT INTO @Bank
SELECT DISTINCT RTRim(ValidationString) FROM Bingo.dbo.Bank

INSERT INTO @Bank
SELECT DISTINCT RTRim(ValidationString) FROM BingoHistory.dbo.Bank

to...

INSERT INTO @Bank
SELECT DISTINCT RTRim(ValidationString) FROM Bingo.dbo.Bank

INSERT INTO @Bank
SELECT DISTINCT RTRim(ValidationString) FROM BingoHistory.dbo.Bank

INSERT INTO @Bank
SELECT DISTINCT RTRim(ValidationString) FROM GAMESERVER0.Bingo.dbo.Bank

inside a UDF in Enterprise. The "@Bank" is an internal temporary table declared in the UDF. When I clicked check syntax, all was ok. BUT, when I clicked OK to save, I got an error dialog stating...

"Heterogeneous queries require ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue the query."

Is there some way make this work from inside the UDF, or will I have to do the third query in a separate UDF, called from the first?