Subscribe to this feed

Navigation

Recent Posts

Archive

Popular Tags

Click tag to retrieve blogs
  1. Excel (9)
  2. Oracle (6)
  3. csv (5)
  4. batch files (5)
  5. VBA (3)
  6. Apache (3)
  7. DOS (3)
  8. SQL*Plus (3)
  9. Macro (3)
  10. bat (3)
  11. PHP (3)
  12. SQLPLus (3)
  13. System Implementation (2)
  14. MySQL (2)
  15. Microsoft (2)
  16. Windows (2)
  17. new systems (2)
  18. SQL (2)
  19. data migration (2)
  20. IE (1)
  21. SnagIt (1)
  22. Hard drives (1)
  23. Wireless Jack (1)
  24. MS Query (1)
  25. Geocoding (1)

Exit SQLPlus from Batch File

Saturday 05 May, 2007 - 12:57pm | 0 comments |

If you have a batch file set to run multiple SQLPlus queries and to then perform some other action such as merge the results together into a single file, or copy the files elsewhere you need to physically exit SQLPlus or the batch file will not continue to run and execute the commands.

To exit SQLPlus automatically skip a line after your last query and type exit as in

@C:\Queries\Query_1.sql
@C:\Queries\Query_2.sql
@C:\Queries\Query_3.sql
@C:\Queries\Query_4.sql

EXIT

Tags:SQLPlus |Oracle |DOS |bat |batch file

Comment
 | Link | Back to top | del.icio.us digg it furl reddit

Run Multiple SQLPlus Queries via DOS batch file

Saturday 05 May, 2007 - 12:51pm | 5 comments |

To run multiple SQLPlus queries as part of a DOS batch file place all the queries in a separate SQL file. For Example

@C:\Queries\Query_1.sql
@C:\Queries\Query_2.sql
@C:\Queries\Query_3.sql
@C:\Queries\Query_4.sql

Save the file as runall.sql. Then use this file in your batch file

@Echo Off
sqlplus [login details] @C:\queries\runall.sql
EXIT

Tags:SQLPlus |bat |DOS |Oracle

Comment
 | Link | Back to top | del.icio.us digg it furl reddit

Merge Multiple CSV Files

Sunday 01 Apr, 2007 - 14:48pm | 49 comments |

You can merge multiple csv or text files with a simple DOS command. Copy the code below into a text editor and save the file with a .bat extension. Save the file in the same folder as the csv files.

copy *.csv importfile.csv

I've used this as part of an import routine. Step one produces a set of csv files from SQL queries on an Oracle database. Step two merges all the csv files together. Step three imports a single file into Sage MMS

Tags:csv |File Import |batch files |bat

Comment
 | Link | Back to top | del.icio.us digg it furl reddit

© Eriginal Ltd 2011, all rights reserved