Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
Do you know how make a join on a like.
ID1= ID2 become ID1 like ID2
When I named both ID tthis the same name I have a join on equal only.
Thanks by advance.
Eva
Hi Eva.
I tried a different approach:
Create a cartesian product with the two tables.
Use the length of ID1 to match to ID2 (ie.if (ID1 = left(ID2,length of ID1).
See the attched example.
John.
Hi,
Use this approach
TableName:
Load
ID1..
From..
Left join(TableName)
Load
ID2 as ID1..
From..
Hope it will help you
Celambarasan
Hi, thanks for your answer but
I would like join if ID1 = 123 and ID2 = 123 45
I tried and that join if ID1= ID2 only.
You can only use the join clause to join on the equality of one or many fields. If they're ALL equal, then it's a match, if not, then not. The only operators supported in the join clause are 'and' and 'equals'. If you only use inner join, then you could use a cross join instead to emulate an inner join and filter in the where condition, e.g:
Code Snippet
From a in db.Table1 _
From b in db.Table2 _
Where a.Something=b.Something And a.SomethingElse.StartsWith("a")
Regards, tresesco
Hi Eva.
I tried a different approach:
Create a cartesian product with the two tables.
Use the length of ID1 to match to ID2 (ie.if (ID1 = left(ID2,length of ID1).
See the attched example.
John.
Thnaks, that is a really good idea (specially for a friday) !! thanks for your help.
(I just hope it will work this my hudge table)