Home » U++ Library support » U++ SQL » [SOLVED] How to join two tables from two schemas with SqlExp
[SOLVED] How to join two tables from two schemas with SqlExp [message #50841] |
Tue, 08 January 2019 15:06 |
Patisab
Messages: 21 Registered: December 2015 Location: France
|
Promising Member |
|
|
Hello,
I have two schemas (S1 and S2) in one database (D1). I have to join one table from S1 with one table from S2. I am connected to the database whith user who is granted as owner of S1 and as reader of S2. Something like that :
SELECT T1.Col1, T1.Col2, S2.T1.Col2, S2.T1.Col3
FROM T1
INNER JOIN S2.T1 ON S2.T1.Col1 = S1.T1.Col1
When i try to do that with SqlExp like this :
Select(Col1.Of(T1),Col2.Of(T1),Col2.Of(T2),Col3.Of(T2))
.From(T1)
.InnerJoin(S2.T1).As(T2).On(Col1.Of(T2) == Col1.Of(T1))
...i obtain an error message that explains S2 is not declared.
So is it possible? If it is, how?
Thank you very much for your help.
Bests regards... and happy new year
[Updated on: Wed, 09 January 2019 13:24] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Jun 01 05:30:54 CEST 2024
Total time taken to generate the page: 0.01237 seconds
|