I have the following script, and it is not working....I execute the BAT file, it completes, yet nothing has happened:
bcp sainsburys.crdm.Header_20070613 in "SELECT 321561+TransactionID, InsertedDateTime, DATEADD(DAY,14,EndTransDateTime), StoreNo, POSNo, TicketNo, TradingDay, StartTransDateTime, CashierNo, CheckoutBank, TillType, SerialNo, CodeVersion, NumberOfItems, TicketAmount, TaxAmount, HomeShoppingFlg, NoSaleFlg, VoidTicketFlg, CTPFlg, DriveOffFlg, PumpTestFlg, TrainingModeFlg, StoredFlg, RecalledFlg, POSOfflineFlg, ReenteredTransactionFlg, DiscountKeyUsedFlg, TaxExemptUsedFlg, BadRecordFlg, GiftReceiptPrintedFlg, VATReceiptPrintedFlg, ReceiptRePrintedFlg FROM OPENROWSET(BULK 'D:\crdm.Header_20070530.dat', FORMATFILE = 'D:\crdm.Header_20070530.fmt')AS a" -SWS23 -T -c -E
The select statement works fine, but no data is imported into the table (the database, server, and table DO exist on the drive specified).
Heeelp
BCP script not working
Moderator: DosItHelp