-- Use the postgresql COPY command to load a CSV into the net_suite_item entity.  The fields should appear in this order for it to work.
-- Also, be sure to sort by the itemId, so that your product dependencies
-- get imported in the correct order.

BEGIN;

COPY net_suite_item 

(ALLOW_DROP_SHIP, ASSET_ACCOUNT_ID, AVERAGECOST, BUILD_SUB_ASSEMBLIES, CLASS_ID, COST_0, COSTING_METHOD, CREATED, CURRENT_ON_ORDER_COUNT, DATE_OF_LAST_TRANSACTION, DEPARTMENT_ID, DEPOSIT, DISPLAYNAME, EXPENSE_ACCOUNT_ID, FEATUREDDESCRIPTION, FEATUREDITEM, FULL_NAME, HANDLING_COST, INCOME_ACCOUNT_ID, ISINACTIVE, ISONLINE, ISTAXABLE, ITEM_EXTID, ITEM_ID, LAST_COGS_CORRECTION, LAST_PURCHASE_PRICE, LOCATION_ID, MODIFIED, ITEM_NAME, OFFERSUPPORT, ONSPECIAL, PARENT_ID, PAYMENT_METHOD_ID, PREF_PURCHASE_TAX_ID, PREF_SALE_TAX_ID, PRINT_SUB_ITEMS, PURCHASEDESCRIPTION, QUANTITYAVAILABLE, QUANTITYONHAND, REORDERPOINT, RESALABLE, SALESDESCRIPTION, SALESPRICE, SHIPPINGCOST, SPECIALSDESCRIPTION, SPECIAL_WORK_ORDER_ITEM, STOREDESCRIPTION, STOREDETAILEDDESCRIPTION, STOREDISPLAYNAME, ITEM_SUBTYPE, TAX_ITEM_ID, TOTALVALUE, TYPE_NAME, UPC_CODE, VENDORNAME, VENDOR_ID, VSOE_DEFERRAL, VSOE_DELIVERED, VSOE_DISCOUNT, VSOE_PRICE, WEIGHT, WEIGHT_UNIT_INDEX, PRODUCT_CATAGORY, UPCITEM_CODE)

FROM '/path/to/net-suite-items.csv' DELIMITERS ',' CSV;

COMMIT;
