public static void main(Args _args)
{
Connection connection;
Statement statement;
str query;
Resultset resultSet;
connection = new Connection();
statement = connection.createStatement();
query = 'insert into xdscusttableregular (CustAccount) select ACCOUNTNUM from CUSTTABLE where CUSTTABLE.DATAAREAID = "adc" '
+ 'and CUSTTABLE.INVENTSITEID = "ADC"';
new SqlStatementExecutePermission(query).assert();
statement.executeUpdate(query);
CodeAccessPermission::revertAssert();
Info('Insertion done');
}
CustTable custTable
Xdscusttableregular xdscusttableregular;
insert_recordset xdscusttableregular (CustAccount)
select AccountNum from custTable
where custTable.DataAreaId == 'adc'
&& custTable.InventSiteId == 'ADC';
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,802 Super User 2024 Season 2
Martin Dráb 229,129 Most Valuable Professional
nmaenpaa 101,154