Тема: Insert Recordset
Показать сообщение отдельно
Старый 23.09.2004, 13:02   #8  
simply2double is offline
simply2double
Участник
Аватар для simply2double
 
556 / 19 (2) ++
Регистрация: 08.09.2004
Адрес: alfa cen
первый вариант был такой... так сказать SQL интуитивный:

PHP код:
insert_recordset tmp_Table (TransTableID,TransRecID)
         
select TransTableID,TransRecID
              from  MarkUpTrans 
              join VendInvoiceTrans 
              where MarkUpTrans
.TransRecId == VendInvoiceTrans .RecId &&
                          
VendInvoiceTrans.InvoiceId == InvoiceId
но от этого ни чего не меняется...

а изменил прочитав во это:



Код:
Insert Recordset
Insert Recordset copies data from one or more tables directly into one resulting destination table - on a single server trip.

Syntax
     INSERT_RECORDSET <destination-table> ( <list-of-fields> )

        SELECT <list-of-fields1> FROM <source-table> [ WHERE <where-clause> ]

            [ JOIN <list-of-fields2> FROM <joined-source-table> [ WHERE <joined-where-clause> ]]

 

The <list-of-fields> in the destination table must match the list of fields in the source tables. Data is transferred in the order it appears in the list of fields. Fields in the destination table that are not present in the list of fields, are assigned zero-values as in other places in X++. System fields, including Recid, are assigned transparently by the kernel in the destination table.