How can I pass data into a boolean variable in SSIS from Oracle?



I have data in a table in Oracle that I want to query tp simply find out if
something is true or false. Then, I want to tell SSIS to evaluate whether
its true or false and decide if it should execute a certain step.

So far, the only way I have been able to do that is as follows:
1. In oracle, create a view that basically does something like this select *
from table1.
2. In SQL Server I do the following:

declare @ARE_THERE_DUP_ACTIVE_ACCOUNTS as BIT

SELECT @ARE_THERE_DUP_ACTIVE_ACCOUNTS = (CASE WHEN
SUM(ARE_THERE_DUP_ACTIVE_ACCOUNTS)>0 THEN 1
ELSE 0
END
)
FROM
(
SELECT Count(*) as ARE_THERE_DUP_ACTIVE_ACCOUNTS from
LINKED_SERVER..SCHEMA.table1
UNION ALL
SELECT 0
) sub_select

select @are_there_dup_active_accounts as Are_There_Dup_Active_Accounts

3. Then I create an EXECUTE SQL step in SSIS.
4. I create a variable, in this case it's name is
Are_There_Dup_Active_Accounts as boolean
5. I create a step after the execute that I want to execute conditionally
and I link the first step into the second.
6. Then I create a precedence and evaluate on a Expression like this...
@[User::ARE_THERE_INC_BILL_STAGE_RUNS]

From there, the second step will run conditionally, depending on the results
of the SQL query. When this is SQL server data, its easy, but when its
Oracle, I am left with doing extra steps like creating a useless view and
granting privileges for the linked server just so that I can use SQL server's
TSQL which is compatible with SSIS's boolean data type.

Does anyone know of a better way?
.



Relevant Pages

  • Re: creating and executing queries in VBA.
    ... Execute it into what? ... You can't just "execute" a select query. ... When you execute sql it has to go into a report, or a form or a record set. ...
    (microsoft.public.access.modulesdaovba)
  • Re: monitorring number of records processed by AS
    ... execute an MDX query which return this measure and compare to the expected ... Have you take a look at the query executed by AS against your oracle ... Data source is ORACLE. ... Data provider is ORACLE PROVIDER for OLEDB. ...
    (microsoft.public.sqlserver.olap)
  • Re: SELECT DISTINCT slow, how can I speed up
    ... We have staff using Access 2003 as a front end to the Oracle tables ... for the purposes of ad hoc queries. ... come back within a second of the SQL starting to run. ... only 20-50 rows come back and the query takes 28 seconds and there is ...
    (comp.databases.oracle.server)
  • Re: SQL -> Oracle
    ... > 2- extracted all my SQL queries in one single file (that was the tedious ... > 3- now whenever I need new query. ... > - Sybase and SQL server prefix their parameters with '@' ... > - Firebird and Oracle have selectable stored procedures so you use them ...
    (borland.public.delphi.non-technical)
  • Re: UPDATE query in Access 2003 raising error
    ... Runtime error 3066 Query must have at least one destination field. ... The SQL works fine if I use it in the QBF Design mode. ... Set qdfTemp = db.CreateQueryDef ... Elsewhere in the code I use the same technique to execute an SQL ...
    (microsoft.public.access.formscoding)