質問編集履歴
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
現在以下のようなクエリが可能か調査しています。
|
6
6
|
|
7
|
-
$()で囲まれた部分
|
7
|
+
$()で囲まれた部分は疑似コードです。所望の動作はOrder.TableTypeの値によってINNER JOINするモデルを変更しながらリストを得たいと思っています。
|
8
8
|
|
9
9
|
|
10
10
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
FROM Orders
|
16
16
|
|
17
|
-
INNER JOIN $(another_table if Orders.table_type ==1: another_table=Customers else: another_table=Products
|
17
|
+
INNER JOIN $(another_table if Orders.table_type ==1: another_table=Customers else: another_table=Products)
|
18
18
|
|
19
19
|
ON Orders.CustomerID=$(another_model).ID;
|
20
20
|
|