Unanswered posts

#1 2012-05-31 17:30:41

fox82
New member
Registered: 2012-05-31
Posts: 2

join table

Tags: [join, tmap]

Hi to all
I have two table, and i have to create this query sql

TABELLA 1
GRUPPO
USER
DESCRIZIONE

TABELLA 2
USER
OPERAZIONE
VALORE


SELECT A.USER, B.GRUPPO, A.OPERAZIONE, A.VALORE FROM TABELLA1 A, TABELLA2 B WHERE A.USER=B.USER.

for this i use Tmap object but it makes a left join so i have this situation:


tabella1
A|ale|aaaaaa
B|franco|bbbbbb


tabella2
ale|IN|50
franco|OUT|100
davide|OUT|10

This is the result of tmap
ale|A|IN|50
franco|B|OUT|100
davide||OUT|10


Instead i'd like to have
ale|A|IN|50
franco|B|OUT|100

Any suggestion?I try to use tjoin but i don't understand how to use it.

Thanks
Alessandro

Last edited by fox82 (2012-05-31 17:32:45)

Offline

#2 2012-05-31 21:53:43

tgrady
Member
Registered: 2010-10-27
Posts: 67

Re: join table

Hi Fox82,

If you want an inner join instead of a left outer join (the default option), go to the TMap's 'Join Model' option on the table being joined to and change the value from left outer join to inner join.

Tom

Offline

#3 2012-06-01 10:48:08

fox82
New member
Registered: 2012-05-31
Posts: 2

Re: join table

ok, i found...but if i want to select the type of operator?
For example, instead of doing A.CAMPO=B.CAMPO, how can i set a join like A.CAMPO>=B.CAMPO??


Thanks
Alessandro

Offline

#4 2012-06-01 14:05:42

djugal
Member
Registered: 2011-06-16
Posts: 229
Website

Re: join table

you can filter out the condition, by putting the filter condition at the bottom of the  the lookup up table in tmap

Regards,
Jugal

Offline

Board footer

Powered by FluxBB