2 Replies Latest reply on Sep 27, 2002 8:21 PM by 271367

    Using "Insert Into (Select ... " with ExecuteSQL

    7435
      The OO4O manual states that you can use the ExecuteSQL method with any non-Select statement. I presume that means I cannot use it for 'Insert Into (Select...' statements then? I have the following statement which works perfectly in SQL*Plus but inserts zero rows when passed through OO4O:

      Insert into labor_activity
      (Select 23, L.SON_NUMBER, ACTIVITY_CODE, HOURS, Equip_Type_In, Labor_Rate, COGNIZANT_ORG, CLOSE_DATE, i.invc_nmbr
      From labor_activity_record L, X408_ORDER_RECORD X, b406.NEW_SB_ALPHA_RECORD s, invoice_record I
      Where L.SON_NUMBER = X.SON_NUMBER and s.SB_SON_NMBR = X.SON_NUMBER and i.son_nmbr = x.son_number and CLOSE_DATE >= to_date('2002-02-02','YYYY-MM-DD') and CLOSE_DATE <= to_date('2002-03-01','YYYY-MM-DD') And x.overhaul_flag = 'N' and s.New_Alpha_sb = 'NIL' and EQUIP_TYPE_IN In (Select Equipment_Type From Controls Where EXPIRATION_DATE > '2002-07' and EFFECTIVE_DATE <= '2002-07'))

      TIA,

      Jim
        • 1. re:Using
          82532
          Can you turn on a client side SQL*Net trace? This will let you capture the SQL that OO4O is passing over. It is probably tweaking it for you in router and causing it to fail. If you see what it is doing you can probably figure out how to adjust it to work. If nothing else you might see an error there that is not being propogated.
          • 2. re:Using
            271367
            Did you ever get this to work? I have alot of information I need to take from Excel and put into Oracle and I need some help. Thanks, Jeremy