I'm trying to insert data from 3 tables that holds data from CSV files into a meaningful warehouse table but don't know if my syntax is correct.
insert into warehouseTBL
select a.recordNum, b.fieldA, b.fieldB, c.fieldC, c.fieldD,
  from ctrTable a, tableB b, tableC c
 where a.recordNum = b.recordNum
   and a.recordNum = c.recordNum
   and a.someField = b.someField
   and a.someField = c.someField
So should I use a nested select in the From clause so it look something like this:
  from ctrTable a, (
        select *
          from tableB, tableC,
         where tableB.recNum = tableC.recNum
       ) as d,
 where a.recNum      = d.recNum
Does the syntax even make开发者_StackOverflow中文版 sense?
Use this query to insert the rows,
insert into warehouseTBL
select recordNum, fieldA, fieldB, fieldC,fieldD from 
(select a.recordNum, b.fieldA, b.fieldB, c.fieldC, c.fieldD,
  from ctrTable a, tableB b, tableC c
 where a.recordNum = b.recordNum
   and a.recordNum = c.recordNum
   and a.someField = b.someField
   and a.someField = c.someField)p
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论