개정판 b96cf292
issue #1462: fix sql
Change-Id: I57362b1f4819037103a2fc7d5f2bb2c37319ccf2
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
2724 | 2724 |
# Get a cursor object |
2725 | 2725 |
cursor = conn.cursor() |
2726 | 2726 | |
2727 |
if hmb_uid:
|
|
2727 |
if stream_no:
|
|
2728 | 2728 |
sql = f"select h.Drawing_UID, h.From_Component_UID, h.To_Component_UID, d.Name from HMB_From_To h " \ |
2729 | 2729 |
f"inner join Drawings d on d.UID=h.Drawing_UID " \ |
2730 | 2730 |
f"where Stream_No = ?" |
2731 | 2731 |
params = (stream_no,) |
2732 | 2732 |
else: |
2733 | 2733 |
sql = f"select h.From_Component_UID, h.To_Component_UID, s.Stream_No from HMB_From_To h " \ |
2734 |
f"inner join Stream_No s on s.UID=h.Stream_No_UID " \
|
|
2734 |
f"inner join Stream_No s on s.Stream_No=h.Stream_No " \
|
|
2735 | 2735 |
f"where Drawing_UID = ?" |
2736 | 2736 |
params = (drawing_uid,) |
2737 | 2737 |
sql = self.project.database.to_sql(sql) |
내보내기 Unified diff