Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Queries as the Source ....

Status
Not open for further replies.

ProDev

Programmer
Jul 9, 2003
51
US
Hi,

I have been using the flat files and the relational tables as the source files in my Informatica mappings.

Can we use the SQL query (on multiple tables) as the source ?? If yes, then how ?

Well, let me tell you the situation that I need to handle ...


Two of my oracle tables are TableA and TableB. I need the following results.

1. Select TableA.StartDate, TableA.EndDate
from TableA Where TableA.ExecutionID =
(select max(V.ExecutionID) from TableA V);


Now, I have to use this two outputs (StartDate, EndDate)
to get following result.


2.
Select * from TableB
where TableB.CreateDate
between StartDate and EndDate


Can anybodyt pls help me out, explaining the solution.

Thanks.
 
By far the most simple solution would be to create a database-view that holds the SQL that would otherwise constitute the query. The view as database-object can be imported as a source for the mapping (it will work like a table in that respect) Read-only views should not be a problem with your DBA I suspect....

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top