Search found 11 matches
- 31 Mar 2009 07:07
- Forum: DOS Batch Forum
- Topic: Help to code loop script
- Replies: 7
- Views: 11504
Ok, I'm ALMOST there. There is still one thing that is puzzling me. Here is the code: ::@ECHO OFF setlocal enabledelayedexpansion SET Count=0 SET MaxTranID=6 SET CurrentStoreCount=3 SET StoreNo1=16 SET StoreNo2=17 SET StoreNo3=18 SET NewStoreNo1=16 SET NewStoreNo2=17 SET NewStoreNo3=18 ::Create dire...
- 31 Mar 2009 05:52
- Forum: DOS Batch Forum
- Topic: Help to code loop script
- Replies: 7
- Views: 11504
- 31 Mar 2009 05:37
- Forum: DOS Batch Forum
- Topic: Help to code loop script
- Replies: 7
- Views: 11504
Hmmm, still not working. Basically, i have slightly changed the command (as the bcp with BULK INSERT was not working). This new command works, but I keep getting an error regarding duplicates. This means that the changes to TranID and StoreNo are not working: ::@ECHO OFF setlocal enabledelayedexpans...
- 31 Mar 2009 02:31
- Forum: DOS Batch Forum
- Topic: Help to code loop script
- Replies: 7
- Views: 11504
- 30 Mar 2009 10:45
- Forum: DOS Batch Forum
- Topic: Help to code loop script
- Replies: 7
- Views: 11504
Help to code loop script
Hi there I have a script (below), where I know what I want to acheive, but I just don't have adequate knowledge to actually do it. I have highlighted the sections in red that I know are not correct: @ECHO OFF setlocal enabledelayedexpansion SET Count = 1 SET MaxTranID = 6 SET CurrentStoreCount = 3 S...
- 27 Mar 2009 07:55
- Forum: DOS Batch Forum
- Topic: BCP script not working
- Replies: 0
- Views: 5057
BCP script not working
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...
- 25 Mar 2009 12:30
- Forum: DOS Batch Forum
- Topic: Domina error when trying to execute BAT file on SQL Server
- Replies: 2
- Views: 5577
- 25 Mar 2009 11:15
- Forum: DOS Batch Forum
- Topic: Domina error when trying to execute BAT file on SQL Server
- Replies: 2
- Views: 5577
Domina error when trying to execute BAT file on SQL Server
I have created a BAT file to run a procedure that, in turn, creates another BAT file based on the tables within the database. This was working locally with no issues. I have now logged onto the database server, and have tried to execute the first BAT file, but obtain the following error: Msg 3623, L...
- 25 Mar 2009 03:39
- Forum: DOS Batch Forum
- Topic: IF Statement not working
- Replies: 4
- Views: 7749
- 24 Mar 2009 08:51
- Forum: DOS Batch Forum
- Topic: IF Statement not working
- Replies: 4
- Views: 7749
- 24 Mar 2009 05:45
- Forum: DOS Batch Forum
- Topic: IF Statement not working
- Replies: 4
- Views: 7749
IF Statement not working
I have the following code (reduced for example purposes): @ECHO OFF SET count = 1 FOR /l %%G in (1, 1,2) DO ( ECHO CALL :parameter_count "%%G" IF count == 2 (sqlcmd -S WS23 -E -d sainsburys -Q "DROP TABLE dbo.NewStoreMapping;") ) :parameter_count ECHO RUNN...