Help required in passing data to a database..!!

Hi all,
I am working with a VI which generates a table data as output and i want to pass this data to an online database, may be using SQL. But as I am not so good with SQL and other database management systems, can anyone please tell me how to do this. An example VI would be appreciated.
Thankful regards,
Nitz

Hi ,
I tried doing this with the data connectivity tool kit.. But still I am getting some errors and not being able to get the results what I want. I have attached the vi and access file on which i am working. What i am trying to do is, when ever i press the enter button, i want the strings entered in the three string controls updated into the database table. But when I am doing this, the first value is getting entered and after that I am getting an error.
Please help me how to handle this data connectivity toolkit...
Thankful regards,
Nitz..
Attachments:
Untitled 1.vi ‏16 KB
TDPdata.zip ‏10 KB

Similar Messages

  • Help needed to insert data from different database

    Hi ,
    I have a requirement where i need to fetch data from different database through database link .Depending on user request , the dblink needs to change and data from respective table from mentioned datbase has to be fetched and populated .Could i use execute immediate for this, would dblink work within execute immediate .If not , could pls let me know any other approach .

    What does "the dblink needs to change" mean?
    Are you trying to dynamically create database links at run-time? Or to point a query at one of a set of pre-established database links at run-time?
    Are you sure that you really need to get the data from the remote database in real time? Could you use materialized views/ Streams/ etc to move the data from the remote databases to the local database? That tends to be far more robust.
    Justin

  • Help required to get data from Cash Mgt

    Hi
    I need help to get following data from cash managemment .
    Bank Name
    Branch
    Account#
    Date
    cheque#/Ref
    Amount Direct Debited by bank
    Amount Direct credeted by bank.
    Kindly help
    Regards

    Hello.
    See if this helps. When the Amount column shows a negative number it represents a Debit.
    select b.bank_account_name "Bank Account" ,
    bb.bank_branch_name "Branch",
    b.bank_account_num "Bank Acc Num",
    l.trx_date "Date",
    l.trx_type "Type",
    l.trx_text "Description",
    l.amount "Amount"
    from ce_statement_headers_all h,
    ce_statement_lines l,
    ap_bank_accounts_all b,
    ap_bank_branches bb
    where b.bank_account_id = h.bank_account_id
    and l.statement_header_id = h.statement_header_id
    and bb.bank_branch_id = b.bank_branch_id
    and b.bank_account_id = <bank_account_id>
    and h.statement_number = <'statement number'>
    Octavio

  • Technique to pass data between two databases

    I am developing a web application with an offline client.
    for offline client am using embedded mysql using mysql-je http://mysql-je.sourceforge.net/
    for online ie for overall application( server ) am using mysql 5.0.
    i want to update data from client to server and also from server to client .
    pls tell me is how i can implements this ?...
    Message was edited by:
    vp_anil

    The other reply is about connectivity only. If you have connectivity then it isn't relevant. If you don't then you can't do anything.
    So ignoring that....
    >
    pls tell me is how i can implements this ?...It depends on your data.
    Basically you can have the following data problems
    A. Add rows
    B. Delete rows
    C. Modify rows
    You can also have two directions
    1. Client to main database.
    2. Client from main database.
    In terms of solution.
    - Decide direction.
    - Add rows - use a creation time stamp. Get last update timestamp then moving anything newer.
    - Delete rows. Harder than add because either you have to keep a record of deleted entries or you have to compare the entire existing set and look for holes. Once you find existing entries then delete them.
    - Modify. Much harder and it depends on the data. It should also be considered whether manual verification is required. For instance can the customer address (stored in the database) be updated both on the clien and the main database? If yes then which one is right? What if the address was updated in both places and then a day later the phone number was updated? Two changes and maybe one is right in one place and one is right in the other. A replay log might help here but maybe not.

  • Help Required in Master data Data model

    Hello,
    May some one help me in explaining the relation with the sales org, sales office, sales group, distribution channel, division, plant, material, Customer, controlling area, profit centre and cost element.
    These are the info objects I have in my COPA data source. I need to decide about the master data now. I need to know which info objects can be used for master data.
    Thanks in advance!
    Help me with the inputs please!!
    Points will be assigned!
    Regards
    Sri

    <b>Sales Organization</b>
    A organizational unit in Logistics that structures the company according to its sales requirements.
    A sales organization is responsible for selling materials and services.
    <b>Sales Office</b>
    A organizational unit in a geographical area of a sales organization.
    A sales office establishes contact between the firm and the regional market.
    <b>Sales Group</b>
    A organizational unit that performs and is responsible for sales transactions.
    <b>
    Distribution Channel</b>
    CA channel through which saleable materials or services reach customers.
    Distribution channels include wholesale, retail, and direct sales. You can assign a distribution channel to one or more sales organizations.
    Please search <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm">Glossary</a> for more....

  • CAT2 - Help required for changing data

    The requirement I have is, if the data is entered for a particular activity type in CAT2, and if it exceeds the default hours alloted for that week, the extra hours need to be split into different activity types.
    Say, this is the data entered: (Max of 35 Hrs per week as per IT0007) (Click on the link below to see sample data!)
    [http://img32.picoodle.com/img/img32/5/12/21/f_datam_9dfadb2.jpg]
    (The value for Thu is 5 and not 6 in the initial entry.)
    The data has to remain exact until it reaches 35 hours and then the extra hours need to be split and entered in a different activity type. (BU is also counted as regular working hours and value for BU is to remain same)
    I tried using the user-exit CATS0002 but since the user exit gets only the value of a single cell at a time, I am not able to process the data for my requirement. and this user exit is triggered only for the cells where the value is changed... if the data is already entered and the user changes some cell, I don't get the whole data entered and hence, I can't modify the already existing data on the timesheet.
    Has anyone coded for a similar scenario? Your help will be really appreciated.
    P.S: I am working on ECC 6.0

    Hi Nazim,
    There is an user-exit for validating the whole time sheet (I think it is  nr. 6, but I am not sure), in this one you could check all the hours, but I am not sure if it will suffice for your requirement.
    Regards,
    Martin

  • Help needed with passing data between classes, graph building application?

    Good afternoon please could you help me with a problem with my application, my head is starting to hurt?
    I have run into some difficulties when trying to build an application that generates a linegraph?
    Firstly i have a gui that the client will enter the data into a text area call jta; this data is tokenised and placed into a format the application can use, and past to a seperate class that draws the graph?
    I think the problem lies with the way i am trying to put the data into co-ordinate form (x,y) as no line is being generated.
    The following code is from the GUI:
    +public void actionPerformed(ActionEvent e) {+
    +// Takes data and provides program with CoOrdinates+
    int[][]data = createData();
    +// Set the data data to graph for display+
    grph.showGrph(data);
    +// Show the frame+
    grphFrame.setVisible(true);
    +}+
    +/** set the data given to the application */+
    +private int[][] createData() {+
    +     //return data;+
    +     String rawData = jta.getText();+
    +     StringTokenizer tokens = new StringTokenizer(rawData);+
    +     List list = new LinkedList();+
    +     while (tokens.hasMoreElements()){+
    +          String number = "";+
    +          String token = tokens.nextToken();+
    +          for (int i=0; i<token.length(); i++){+
    +               if (Character.isDigit(token.charAt(i))){+
    +                    number += token.substring(i, i+1);+
    +               }+
    +          }     +
    +     }+
    +     int [][]data = new int[list.size()/2][2];+
    +     int index = -2;+
    +     for (int i=0; i<data.length;i++){+
    +               index += 2;+
    +               data[0] = Integer.parseInt(+
    +                         (list.get(index).toString()));+
    +               data[i][1] = Integer.parseInt(+
    +                         (list.get(index +1).toString()));+
    +          }+
    +     return data;+
    The follwing is the coding for drawing the graph?
    +public void showGrph(int[][] data)  {+
    this.data = data;
    repaint();
    +}     +
    +/** Paint the graph */+
    +protected void paintComponent(Graphics g) {+
    +//if (data == null)+
    +     //return; // No display if data is null+
    super.paintComponent(g);
    +// x is the start position for the first point+
    int x = 30;
    int y = 30;
    for (int i = 0; i < data.length; i+) {+
    +g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);+
    +}+
    +}+

    Thanks for that tip!
    package LineGraph;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.List;
    public class GUI extends JFrame
      implements ActionListener {
      private JTextArea Filejta;
      private JTextArea jta;
      private JButton jbtShowGrph = new JButton("Show Chromatogram");
      public JButton jbtExit = new JButton("Exit");
      public JButton jbtGetFile = new JButton("Search File");
      private Grph grph = new Grph();
      private JFrame grphFrame = new JFrame();   // Create a new frame to hold the Graph panel
      public GUI() {
         JScrollPane pane = new JScrollPane(Filejta = new JTextArea("Default file location: - "));
         pane.setPreferredSize(new Dimension(350, 20));
         Filejta.setWrapStyleWord(true);
         Filejta.setLineWrap(true);     
        // Store text area in a scroll pane 
        JScrollPane scrollPane = new JScrollPane(jta = new JTextArea("\n\n Type in file location and name and press 'Search File' button: - "
                  + "\n\n\n Data contained in the file will be diplayed in this Scrollpane "));
        scrollPane.setPreferredSize(new Dimension(425, 300));
        jta.setWrapStyleWord(true);
        jta.setLineWrap(true);
        // Place scroll pane and button in the frame
        JPanel jpButtons = new JPanel();
        jpButtons.setLayout(new FlowLayout());
        jpButtons.add(jbtShowGrph);
        jpButtons.add(jbtExit);
        JPanel searchFile = new JPanel();
        searchFile.setLayout(new FlowLayout());
        searchFile.add(pane);
        searchFile.add(jbtGetFile);
        add (searchFile, BorderLayout.NORTH);
        add(scrollPane, BorderLayout.CENTER);
        add(jpButtons, BorderLayout.SOUTH);
        // Exit Program
        jbtExit.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
             System.exit(0);
        // Read Files data contents
         jbtGetFile.addActionListener(new ActionListener(){
         public void actionPerformed( ActionEvent e) {
                   String FileLoc = Filejta.getText();
                   LocateFile clientsFile;
                   clientsFile = new LocateFile(FileLoc);
                        if (FileLoc != null){
                             String filePath = clientsFile.getFilePath();
                             String filename = clientsFile.getFilename();
                             String DocumentType = clientsFile.getDocumentType();
         public String getFilecontents(){
              String fileString = "\t\tThe file contains the following data:";
         return fileString;
           // Register listener     // Create a new frame to hold the Graph panel
        jbtShowGrph.addActionListener(this);
        grphFrame.add(grph);
        grphFrame.pack();
        grphFrame.setTitle("Chromatogram showing data contained in file \\filename");
      /** Handle the button action */
      public void actionPerformed(ActionEvent e) {
        // Takes data and provides program with CoOrdinates
        int[][]data = createData();
        // Set the data data to graph for display
        grph.showGrph(data);
        // Show the frame
        grphFrame.setVisible(true);
      /** set the data given to the application */
      private int[][] createData() {
           String rawData = jta.getText();
           StringTokenizer tokens = new StringTokenizer(rawData);
           List list = new LinkedList();
           while (tokens.hasMoreElements()){
                String number = "";
                String token = tokens.nextToken();
                for (int i=0; i<token.length(); i++){
                     if (Character.isDigit(token.charAt(i))){
                          number += token.substring(i, i+1);
           int [][]data = new int[list.size()/2][2];
           int index = -2;
           for (int i=0; i<data.length;i++){
                     index += 2;
                     data[0] = Integer.parseInt(
                             (list.get(index).toString()));
                   data[i][1] = Integer.parseInt(
                             (list.get(index +1).toString()));
         return data;
    public static void main(String[] args) {
    GUI frame = new GUI();
    frame.setLocationRelativeTo(null); // Center the frame
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("Clients Data Retrival GUI");
    frame.pack();
    frame.setVisible(true);
    package LineGraph;
    import javax.swing.*;
    import java.awt.*;
    public class Grph extends JPanel {
         private int[][] data;
    /** Set the data and display Graph */
    public void showGrph(int[][] data) {
    this.data = data;
    repaint();
    /** Paint the graph */
    protected void paintComponent(Graphics g) {
    //if (data == null)
         //return; // No display if data is null
    super.paintComponent(g);
    //Find the panel size and bar width and interval dynamically
    int width = getWidth();
    int height = getHeight();
    //int intervalw = (width - 40) / data.length;
    //int intervalh = (height - 20) / data.length;
    //int individualWidth = (int)(((width - 40) / 24) * 0.60);
    ////int individualHeight = (int)(((height - 40) / 24) * 0.60);
    // Find the maximum data. The maximum data
    //int maxdata = 0;
    //for (int i = 0; i < data.length; i++) {
    //if (maxdata < data[i][0])
    //maxdata = data[i][1];
    // x is the start position for the first point
    int x = 30;
    int y = 30;
    //draw a vertical axis
    g.drawLine(20, height - 45, 20, (height)* -1);
    // Draw a horizontal base line4
    g.drawLine(20, height - 45, width - 20, height - 45);
    for (int i = 0; i < data.length; i++) {
    //int Value = i;      
    // Display a line
    //g.drawLine(x, height - 45 - Value, individualWidth, height - 45);
    g.drawLine(data[i][0],data[i][1],data[i+1][0],data[i+1][1]);
    // Display a number under the x axis
    g.drawString((int)(0 + i) + "", (x), height - 30);
    // Display a number beside the y axis
    g.drawString((int)(0 + i) + "", width - 1277, (y) + 900);
    // Move x for displaying the next character
    //x += (intervalw);
    //y -= (intervalh);
    /** Override getPreferredSize */
    public Dimension getPreferredSize() {
    return new Dimension(1200, 900);

  • Help required please on data transfer between DAW's

    Are there any Logic user/s who have moved DAW from Cakewalk to Logic and have transferred
    song data between the two applications? I have tried using OMF but my songs dont line up and go out of synch. Am I using the right file format or is there a better way to do this please?

    Disappointed about the lack of folks who, as per your requirement, converted from Cakewalk to Logic just in time so they could read your post and answer to it ? That would be a bit much, even for Earth Coincidence Control ECCO.
    Converting from one platform to another is one thing, converting from one sequencer to another is another thing, transferring audio is a third, transferring MIDI is a fourth and finally transferring all the other stuff is a fifth chapter altogether.
    Switching platforms is a relatively problem-free endeavour if you make sure there are no special characters ()"!§$%&/*+'#_-:.;,ÄÖÜäöü etc. in any of your file names. If you happen to use +Guitar(take 5):from 5'12"/ 100% wet+ as a file name, you are in trouble. Guaranteed.
    Also make sure you keep file names under 32 characters. Oh, and don't create 32-bit audio files, as these won't work in Logic.
    Logic Projects don't play in Cakewalk and vice versa, as you found out.There is no conversion standard to transfer sessions between DAWs, so you have to make do with what is there and take care of the rest yourself.
    Audio is best converted into one long Region per track, and all Regions must begin at the exact same spot, like 1.1.1.1. This way it takes 15 seconds max to line up all your audio tracks in the new software.
    MIDI can be saved as one or several SMF (standard MIDI File). Each can carry 16 MIDI channels + Tempo information.
    There is no way to transfer all what's left, that is, signature changes, take folders, playlists, audio routings, audio plugins and their settings, markers, text notes, MIDI plugins, etc. So you really need to invent a good working scheme with a writing pad and a lot of screenshots. And quite some concentration and endurance.
    Good Luck
    Christian

  • Transfer data from one database to another

    Hello,
    We have an application which uses an Oracle 9i server database. On this server we have two databases ( one for test and one for production ).
    From time to time it's required to transfer data from production database to test database.
    The steps followed by the ones which made the transfer are:
    a) drop the user schema ( the one which contains all data)
    b) recreate the user
    c) import the data ( using import utility )
    d) compile invalid object ( what this will mean I don't know)
    It's not possible to delete only the content of the tables and then import data from a dump file? In this way the steps c) and d) will no longer be required. If this is possible can you tell me if is there a command which will delete all data from all table ( almost 2000 tables)?
    Thank you fro your help!

    I think ..following a,b,c,d is the best way to maintain consistency. you are just thinking about the data in the tables, but what about the changes in views,procedures,functions etc....
    compile invalid object ( what this will mean I don't know)create a file xxx.sql with following code and execute it from sql*plus
    set echo off
    set head off
    set feedback off
    set timing off
    spool compile_invalid_obj.sql
    select 'ALTER '||DECODE(OBJECT_TYPE,'PACKAGE BODY','PACKAGE',OBJECT_TYPE)||' '||OBJECT_NAME||' '||DECODE(OBJECT_TYPE,'PACKAGE','COMPILE PACKAGE;','PACKAGE BODY','COMPILE PACKAGE;','COMPILE;')
    from user_objects
    where status = 'INVALID';
    spool off
    set feedback on
    set echo on
    set timing on
    @compile_invalid_obj.sql
    HTH
    --Chaitanya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass data from one internal session to another internal session

    hi all sap experts ,
    How to pass data from one internal session to another internal session and from oneExternal session to another external session.
    Except : Import and Export parameters and SPA/GPA parameters.
    Tell me the otherWay to pass data ..
    Plz
    Thanks in advance

    hi,
      abap memory management u will understand about this concept.
    the import /export parameter will help u that passing data between two internal sessions by using abap memory.
      for syntax
    Passing Data Between Programs
    There are two ways of passing data to a called program:
    Passing Data Using Internal Memory Areas
    There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens (see below).
    ABAP Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse. For further information, refer to Data Clusters in ABAP Memory.
    Filling Input Fields on an Initial Screen
    Most programs that you call from other programs have their own initial screen that the user must fill with values. For an executable program, this is normally the selection screen. The SUBMIT statement has a series of additions that you can use to fill the input fields of the called program:
    Filling the Selection Screen of a Called Program
    You cannot fill the input fields of a screen using additions in the calling statement. Instead, you can use SPA/GPA parameters. For further information, refer to Filling an Initial Screen Using SPA/GPA Parameters.
    Message was edited by:
            sunil kumar
    Message was edited by:
            sunil kumar

  • Help Required: Working with relational data

    Hi,
    I'm looking for some advice
    Scenario
    We have a customer who has an SE relational database with Apex for transaction processing. They require reporting functionality and are debating whether to buy BI SE One or BI EE; they will not buy the enteprise edition database though.
    Questions
    Here are my questions:
    1. In order to use answers and dashboards, does the relational data have to be in a dimensional format. Is this reccommended.
    2. We were debating on whether to create data marts for various business requirements. Is this standard procedure for relational data (Which is not too complex)
    3. If the data has to be in a dimensional format, is this best modelled using warehouse builder or the model layer of the repository using BI Administrator. (Baring in mind that the customer is an SME using a SE database)
    The main problem where having, been fairly new to warehouse building, is that we dont know what the best path is to take when working with relational data. Do we create dimensional models? What should we use? Is a relational structure suitable enough?
    Can anyone shed light on our problems
    Regards
    Kevin

    1. In order to use Answers and Dashboards you do not need to have a Data Warehouse. It can report out of both Transactional database as well as a data warehouse.
    2. It depends on what your business requirements are. BI EE/SE1 does not require you to have data marts. Data Marts would give performance gains, would help you in visualizing the transactional data from a business standpoint, is a big plus but not a mandate. If you want to go that route of creating Datamarts, you can easily do that using BI SE1 since that gives you warehouse builder which can be both used as a data modelling tool and a ETL tool.
    3. Warehouse Builder is a ETL tool. It helps in you visualizing/deploying data warehouses in databases. But BI EE Admin tool is more of a logical dimension modelling tool wherein the facts and dimensions do not exist physically but the tool uses them to do the querying/processing.
    Since you are just starting, what you can do is to use BI EE directly on top of the transactional system for the time being. But as a long term solution you can start working on your data marts and as soon as they are ready you can port the BI EE on top of them rather than the transactional system.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How many method can pass data from Database to front-end(aspx)?

    How many method can pass data from Database to front-end(aspx)?
    By using ajax, I want show some data to aspx or html
    Here is one of these method,
    HTTP Handler(ashx):
    we can json data, use HTTP Handler pass data to front-end
    And can we do this by other method? Web API? or some fancy way?
    Thanks for any reply

    Hello TaiwanWei,
    Try forums.asp.net.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I need to pass data from an Access database to Teststand by using the built in Data step types(open data

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1i need to pass data from an Access database to Teststand by using the built in Data step types(open database /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1
    When I tried the same thing on another cmputer the same thing
    happend
    appreiciate u"r help

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1Hello Kitty -
    Certainly it is unusual that you can still see the tables available in your MS Access database but cannot see the columns? I am assuming you are configuring an Open Statement step and are trying to use the ring-control to select columns from your table?
    Can you tell me more about the changes you made to your file when you 'changed' it with MS Access? What version of Access are you using? What happens if you try and manually type in an 'Open Statement Dialog's SQL string such as...
    "SELECT UUT_RESULT.TEST_SOCKET_INDEX, UUT_RESULT.UUT_STATUS, UUT_RESULT.START_DATE_TIME FROM UUT_RESULT"
    Is it able to find the columns even if it can't display them? I am worried that maybe you are using a version of MS Access that is too new for the version of TestSt
    and you are running. Has anything else changed aside from the file you are editing?
    Regards,
    -Elaine R.
    National Instruments
    http://www.ni.com/ask

  • Passing data from JAVASCRIPT to SAP database

    Hi Experts,
    Is it possible to connect or access RFC function module through JAVASCRIPT? I want to send data from JAVASCRIPT to SAP database table.
    Is it possible to pass data from JAVASCRIPT to SAP database table?
    Thanks in advance.
    Regards,
    Arindam Samanta.

    OData services can be one option to achieve this.
    Another possibility can be use of Generic REST enablement with SAP NetWeaver Gateway.
    If you are not considering Gateway at all, then  A JSON adapter like the one mentioned in JSON Adapter for ABAP Function Modules can be handy.

  • Help understanding how to pass dates to procedures in a package?

    When I run the following script in SQL*Plus, I get no obvious errors, but the truncate does not happen and all the other processing doesn't happen. I ran a similar version in another tool and it worked. Much of the code is deleted here but I believe I don't fully understand passing dates in the procedure. I figure if one of the dates ends up null or something invalid, the procedure will run and give no results. If someone could correct me on how to pass variables, it would help greatly. As you can see, I am passing 2 dates in from an ACCEPT statement, passing them to 1 shell type procedure which runs other procedures and passes the dates to the procedures below it. This procedures calls the 3rd procedure and passes the same dates to it:
    ACCEPT CUR_PERIOD PROMPT 'Current Period (MM/DD/YYYY): ';
    ACCEPT PRIOR_PERIOD PROMPT 'Prior Period (MM/DD/YYYY): ';
    EXEC RCO.MONTH_END_PACK_1.MONTHENDPHASE1PROC('&CUR_PERIOD','&PRIOR_PERIOD');
    The spec looks like this:
    CREATE OR REPLACE PACKAGE MONTH_END_PACK_1 AS
         PROCEDURE MonthEndPhase1PROC(get_cur_period IN DATE, get_prior_period IN DATE);
         PROCEDURE W_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE);
         PROCEDURE WO_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE);
    END MONTH_END_PACK_1;
    The body looks like this:CREATE OR REPLACE PACKAGE BODY MONTH_END_PACK_1  AS
    PROCEDURE MonthEndPhase1PROC(get_cur_period IN DATE, get_prior_period IN DATE) IS
         BEGIN
              EXECUTE IMMEDIATE 'TRUNCATE TABLE RPT_DS1_CNT';
              EXECUTE IMMEDIATE 'TRUNCATE TABLE RPT_DS1_CNT_CAT';
              W_CAT_INFO_RPT_PROC(GET_CUR_PERIOD, GET_PRIOR_PERIOD);
         END;
    PROCEDURE W_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE) IS
         CUR_PERIOD DATE;
         PRIOR_PERIOD DATE;
         BEGIN
              -- Assign the dates to this procedure that were passed in above.
              CUR_PERIOD := GET_CUR_PERIOD;         --07/27/2007
              PRIOR_PERIOD := GET_PRIOR_PERIOD;     --06/27/2007
              -- Execute stored procedure, passing in dates.
              WO_CAT_INFO_RPT_PROC(CUR_PERIOD, PRIOR_PERIOD);
              -- Other code goes here
         END; -- W_CAT_INFO_RPT_PROC
    PROCEDURE WO_CAT_INFO_RPT_PROC(GET_CUR_PERIOD IN DATE, GET_PRIOR_PERIOD IN DATE) IS
         CUR_PERIOD DATE;
         PRIOR_PERIOD DATE;
         BEGIN
              CUR_PERIOD := GET_CUR_PERIOD;
              PRIOR_PERIOD := GET_PRIOR_PERIOD;
              INSERT INTO RPT_DS1_CNT
              (select distinct trim(CVBI_KEY) as CVBI_KEY, vendor_id
              from
              (select m.cvbi_key, v.vendor_name
              from  rco.cogs_resource m,RCO.COGS_SRVCTYP st,rco.cogs_mkt ms,RCO.COGS_VENDOR v,
                (select distinct cvbi_key, vendor_id
                 from RCO.COGS_resource
                 where period = CUR_PERIOD)ak
              where  ak.cvbi_key = m.cvbi_key
              and  trim(m.cvbi_key) = trim(st.cvbi_key(+))
              and  period = CUR_PERIOD));
         END;
    END;
    /

    EXEC RCO.MONTH_END_PACK_1.MONTHENDPHASE1PROC(to_date('&CUR_PERIOD','MM/DD/YYYY'),to_date('&PRIOR_PERIOD','MM/DD/YYYY'));
    As you can see, I am passing 2 dates in from an ACCEPT statementUntil you convert them using TO_DATE they are just strings
    Message was edited by:
    3360
    Fixed date formats

Maybe you are looking for