| JanR |
| Newbie |
|
|
|
|
| None Specified |
|
| Friday, February 10, 2012 |
| Friday, April 6, 2012 6:13:59 AM |
3 [0.02% of all post / 0.00 posts per day] |
|
I want to use the SQL-WHERE component to filter the records of my view. However I also want to know if the SQL-WHERE component doesn't find a record.
I see that there's no such function as "exists(row)". How can I detect if there are no records found by the SQL-WHERE component?
Regards, Jan
|
Hi Vlad,
My original 'select' includes more than one table. It looks like:
select t1.nr, t2.start, from table1 t1, table2 t2 where t1.id = (select id from table3 where factuurnr = :p_Fac) and t1.gid = t2.gid
p_Fac is the parameter I try to pass. You see that this SQL-statement does not have the simple structure as the 'SQL-WHERE' component expects, so I cannot apply it to the 'SQL-WHERE' component.
BTW My complicated solution does not work either. It seems not to be possible to connect a query (defined with the 'Insert Database' component) to the 'table/field' input of the 'SQL-WHERE' component, because 'SQL-WHERE' component doesnot allow an additional SQL-WHERE condition.
Any idea how to tackle this problem?
Jan
|
In my mapping I want to run a query to get some info from my Oracle database. The query needs a parameter, say A. The value of A is a field in my source-file.
When I look at the available components in mapforce, I have an 'insert database' and a 'Insert SQL-where Condition'. I think with these 2 components I could solve the problem.
Therefor I have to split my original query in 2 parts. In the first part, I move parameter A from the where-clause to the selected fields. This first part is used by the component 'insert database'. After that I pass the result of the 'insert database' to the component 'Insert SQL-where Condition' where I can do the fine-tuning with parameter A.
The problem with this solution is: - the result of the component 'insert database' is 700.000 records. Fine-tuning by the second component results in only 3 records.
Is there a better solution for my problem? Actually I need a kind of 'insert database' component, to which I can also pass parameter A. Am I overlooking something?
Regards, Jan
|
|