How do I run Firebird SQL Select Statements from a MS SQL Server Stored Procedure
Posted on 2010-08-23
Hi. I am writing a stored procedure in SQL Server that I plan to use to execute some customer-provided Firebird SQL Select Statements. I have not seen these Firebird SQL Statements, and I assume for purposes of this question that what they do is irrelevant. If this assumption is incorrect, please advise and I will attempt to spell out the purpose of the Firebird SQL Statements.
What I am trying to do is "wrap" these Firebird SQL Statements inside my stored procedure, which will be executed by MS SQL Server 2005. I have an ODBC connection to the Firebird database, and I have created a linked server environment in MS SQL Server that successful connects to the Firebird database. Can someone show me how to call or use those Firebird statements within my stored procedure? Thanks.
A high level example:
if @IsLookup = 1
SET @DataToFirebird = @AccountNumber
--At this point I want to know how to call the Firebird scripts
--Now, I will use returned data from the Firebird scripts in my stored procedure
Again, thanks, and please let me know what information is needed; I am sure I have left out pertinent information, but I am not familiar at all with Firebird, and only some experience with SQL Server.