IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: JanR
About
User Name: JanR
Forum Rank: Newbie
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Friday, February 10, 2012
Last Visit: Friday, April 6, 2012 6:13:59 AM
Number of Posts: 3
[0.02% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Function exists(row)
Posted: Thursday, February 16, 2012 11:54:48 AM
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
Topic: Parameter to SQL
Posted: Monday, February 13, 2012 10:12:08 AM
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
Topic: Parameter to SQL
Posted: Friday, February 10, 2012 2:42:46 PM
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

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.