Hi Bill, I'm still confused. The query in my example *is* a select statement and it works fine as such:
query select sales_region, country, historic_save_rate, target_save_rate from t4b.sales.r_bl_inside_sales_ccf_country_target sh=: query ddsel ch sh 6260928 ddfet sh ┌────────┬─────────┬───┬────┐ │Americas│Argentina│0.8│0.83│ └────────┴─────────┴───┴────┘ The error message is "Invalid Object Name". I rewrote my application to generate insert statements for ddsql which works fine but ddins still seems to be complaining about a table name which is a transformation of the name in my query. On Tue, Oct 4, 2016 at 7:59 PM, bill lam <[email protected]> wrote: > The syntax is incorrect for ddins. It expected a select statement. see > > http://code.jsoftware.com/wiki/ODBC/Methods/Bulk_Insert > > you may also try ddparm/ddsparm > > On Oct 5, 2016 6:26 AM, "Michael Berry" <[email protected]> wrote: > > > Hello All, > > > > I apologize if this is a repeat. I am a subscriber to this list and > didn't > > see my post, so I feared maybe no one else did either. > > > > I am having trouble doing a bulk insert using ddins from the J ODBC > > library. The error message is "Invalid object name" and the object name > > included in the error message is indeed invalid, but also not what I > typed. > > All the underscores and periods have been removed. Note that other SQL > > operations, including INSERT, work fine with this same table. Does anyone > > know what is going on? The database I am connected to is SQL Server. My J > > version is 802. My operating system is Windows 7 Professional (64 bit) > > > > Any help appreciated. -Michael > > > > > > > > Some sample output for context: > > > > dddbms ch > > > > ┌────┬────────┬─────────┬──────────┬─────┬──────────┬─────── > > ──────┬──────────┬─┬─┬───┐ > > > > │ODBC│t4bwhsql│US\mberry│T4BSQL01AD│MSSQL│12.00.5000│sqlncli > > 11.dll│11.00.2100│3│1│256│ > > > > └────┴────────┴─────────┴──────────┴─────┴──────────┴─────── > > ──────┴──────────┴─┴─┴───┘ > > > > query > > > > select sales_region, country, historic_save_rate, target_save_rate from > > t4b.sales.r_bl_inside_sales_ccf_country_target > > > > sh=: query ddsel ch > > > > sh > > > > 6260928 > > > > ddfet sh > > > > ┌────────┬─────────┬───┬────┐ > > > > │Americas│Argentina│0.8│0.83│ > > > > └────────┴─────────┴───┴────┘ > > > > ddend sh > > > > 0 > > > > 'truncate table t4b.sales.r_bl_inside_sales_ccf_country_target' ddsql ch > > > > 0 > > > > 'insert into t4b.sales.r_bl_inside_sales_ccf_country_target(sales_ > region, > > country, historic_save_rate, target_save_rate) values(''Americas'', > > ''Argentina'', 0.8, 0.83)' ddsql ch > > > > 0 > > > > sh=: query ddsel ch > > > > sh > > > > 71014208 > > > > ddfet sh > > > > ┌────────┬─────────┬───┬────┐ > > > > │Americas│Argentina│0.8│0.83│ > > > > └────────┴─────────┴───┴────┘ > > > > ddend sh > > > > 0 > > > > data > > > > ┌────────┬─────────────┬────────┬────┐ > > > > │Americas│Argentina │0.820513│0.83│ > > > > │Americas│Bolivia │0.923077│ 0.9│ > > > > │Americas│Brazil │0.909091│ 0.9│ > > > > │Americas│Canada │0.795918│0.81│ > > > > │Americas│Chile │ 0.85 │0.86│ > > > > │Americas│Colombia │0.904762│ 0.9│ > > > > │Americas│Costa Rica │0.805556│0.82│ > > > > │Americas│Ecuador │0.888889│ 0.9│ > > > > │Americas│Mexico │0.840909│0.85│ > > > > │Americas│other │ 0.89 │ 0.9│ > > > > │Americas│Peru │0.666667│0.68│ > > > > │Americas│United States│0.837709│0.85│ > > > > └────────┴─────────────┴────────┴────┘ > > > > (query;data) ddins ch > > > > _1 > > > > dderr '' > > > > 42S02 208 [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid > > object name *'t4bsalesrblinsidesalesccfcountrytarget'*. - more error > info > > available (1) > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
