How to compare two values to hold back one and insert it

Five Stars

How to compare two values to hold back one and insert it

Hi all, 

I have some problem, i want find your support please.

I have a source table "Medicament " and a target table "dim_medicament".

in Medicament i have two variables "PrixUnitaire" and "EtatMed

PrixUnitaire is an float

and EtatMed is an integer (who take the 1 if medicament it's available and 0 if isn't)

In the target table , i want add a "Prix" variable who receive the "PrixUnitaire" if the medicament is available and 0 if isn't.

for dim_medicament.Prix i wrote this expression , and i found a some mistakes:

 (Medicament.EtatMed = 1) ? (Prix = Medicament.PrixUnitaire) : (Prix = 0) 

I ask your help above.

Thank you

 


Accepted Solutions
Eight Stars

Re: How to compare two values to hold back one and insert it

Hello,

 

What about something like this?

 

 

Capture.JPG


All Replies
Eight Stars

Re: How to compare two values to hold back one and insert it

Hello,

 

What about something like this?

 

 

Capture.JPG

Five Stars

Re: How to compare two values to hold back one and insert it

Thank you
my problem is resolved

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download