U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
Patisab is currently offline  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 Very Happy

[Updated on: Wed, 09 January 2019 13:24]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: SQL statements timeout in Linux (bug?)
Next Topic: Connect to TWO databases
Goto Forum:
  


Current Time: Mon Apr 27 19:20:20 GMT+2 2026

Total time taken to generate the page: 0.00507 seconds