Questions

Scripting in Windows need help.

Tags: Web Development, Windows, Networking
+
0 Votes

Scripting in Windows need help.

Carot750
ok so at work I am dealing with new things learning to script, html/javascript language, Oracle/SQL commands/table/schemas and putting it all together. here is the basic break down:

Tables containing Report data (Filename, creation date/time, reporting period, an ID and which of 2 places this report pertains to.

example data:
ID = 1, RPT_NAME = D02.prt1, RPT_NUM = REPD01R02, Time = 23:49, PROC_DATE = 8/19/2013, PLANT = A.

ID = 2, RPT_NAME = D02.prt2, RPT_NUM = REPD01R03, Time = 23:49, PROC_DATE = 8/19/2013, PLANT = B.

ok now the fun part:

I need a script that will look at this data (which is in an Oracle table on one server) and pull the ID and create a folder named that ID then move the file name(RPT_NAM) from one location to that folder.

thanks in advance for any help that can be provided.

Member Answers

    • +
      0 Votes
      robo_dev

      Would it be more efficient to create a table within the database that is your report? Creating individual data files in folders is using the file system of the server as a database. If you need the data offline, just have one report that refreshes, not a whole bunch of data files in different folders which will grow to be whole massive mess of data folders.

      That being said, the most efficient way to do this would be to use the native Oracle scheduler and the Oracle Fusion reporting module, that's part of the DBMS.

      A lot depends on what the user interface for the data is. Assuming it's a web page, then a web folder on a web server would be the destination. You would not need to create individual folders for each file. The advantage of doing it this way is that you can create automatic email notifications for you or your users that there is new data, or if the report fails, it tells you that too.

      http://docs.oracle.com/cd/E23943_01/bi.1111/e22257/create_rpt_jobs.htm




      .

      +
      0 Votes
      Carot750

      That is a great Idea which was mentioned in our office however, this project was kind of a last minute hey get this done and I have basically til next Friday to get it done in an understaffed office and with limited experience in scripting, SQL commands and HTML/Javascript Coding. Eventually we will work towards that right now its a get it working type scenario and without this automation process as well as a few others it will be nigh impossible for us to maintain the current setup in basically manual mode.

    • +
      0 Votes
      robo_dev

      Would it be more efficient to create a table within the database that is your report? Creating individual data files in folders is using the file system of the server as a database. If you need the data offline, just have one report that refreshes, not a whole bunch of data files in different folders which will grow to be whole massive mess of data folders.

      That being said, the most efficient way to do this would be to use the native Oracle scheduler and the Oracle Fusion reporting module, that's part of the DBMS.

      A lot depends on what the user interface for the data is. Assuming it's a web page, then a web folder on a web server would be the destination. You would not need to create individual folders for each file. The advantage of doing it this way is that you can create automatic email notifications for you or your users that there is new data, or if the report fails, it tells you that too.

      http://docs.oracle.com/cd/E23943_01/bi.1111/e22257/create_rpt_jobs.htm




      .

      +
      0 Votes
      Carot750

      That is a great Idea which was mentioned in our office however, this project was kind of a last minute hey get this done and I have basically til next Friday to get it done in an understaffed office and with limited experience in scripting, SQL commands and HTML/Javascript Coding. Eventually we will work towards that right now its a get it working type scenario and without this automation process as well as a few others it will be nigh impossible for us to maintain the current setup in basically manual mode.