BCP script not working

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
bex
Posts: 11
Joined: 24 Mar 2009 05:41

BCP script not working

#1 Post by bex » 27 Mar 2009 07:55

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

Post Reply