all groups > sql server (alternate) > february 2006 >
You're in the

sql server (alternate)

group:

Send 2 SQL statements using Integrated services


Send 2 SQL statements using Integrated services Traveller
2/27/2006 9:13:40 AM
sql server (alternate):
Hi All ,

I am hoping some can help or point me in the right direction. We have
recenlty installed SQL 2005 and are using integrated services using ole
db connections. We are connecting to an Informix database.

My questions is there a way I can pass through multiple sql statements
when I create a OLE DB source to the Informix database.
The reason I am doing this is we need to tell the Informix DB that we
want to use "set isolation dirty read" as well as use the Parallel Data
query part of informix.

Please bear with me as I am just starting to use SQL 2005. I have not
found a way to do this. Can anyone suggest something please.

If you need more Information please also let me know.

Thanks

Traveller
Re: Send 2 SQL statements using Integrated services Erland Sommarskog
2/27/2006 11:10:08 PM
Traveller (vavavoom_th14@yahoo.co.uk) writes:
[quoted text, click to view]

I guess you should be able to do:

SELECT ... FROM OPENQUERY(INFORMIXSRV,
'Firststatement;
Secondstatment;
SELECT ... FROM tbl;'

But keep in mind that OPENQUERY is intended to be used for queries that
returns data in a tabular from that you can use in a SELECT statement,
and not for operations that perform updates. If that is what you are
looking into, it may be better to call a remote stored procedure. (Given
that Informix actually have stored procedures that is.)



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
Re: Send 2 SQL statements using Integrated services Traveller
3/14/2006 2:17:57 AM
Thanks You.
AddThis Social Bookmark Button