Help with Package variables/constants

Hi All,
I have a function which uses package variables and constants.
I am seeing the following strange behavior when I execute the
function. Here is what I did.
1) I opened a SQL* plus session and executed my function couple
of times. It worked very well and gave me the correct return
value.
2) I left the session idle for about 3 hours. ( did not
disconnect.)
3) I came back after 3 hours and ran the same query, it gives
me null value. (error message says PL/SQL numeric or value
error).
4) I disconnected the session and executed the function on the
new session. I got my result back.
Does this scenario looks something familiar to you? If so, could
you pl. advise where it could go wrong? (is it a bug with oracle
8?) P.S. I used dbms pipe package calls also in my package.
Thanx
rk

strange.. test it one more time in same way..if it happens again
submit TAR.

Similar Messages

  • Help with Report Variables

    I have been doing battle with the SBO Customer Receivables Aging Report. I am trying to add the fields "Customer Reference" and "Creation Date" to the Repetitive area of the report with no success. All of the existing fields are variables, and the on-line help says to contact SAP support (which would be me) for help with changing variables. Does anyne have a list of these variables, or know how to define them?
    Many thanks,
    Mike.

    Hi Mike Stroud, i'm actualy also working on the customer ageing report. You also responded to my post. It was the reports one. Well, im not sure about the variables but i simply wrote a query that brings all that info and more up. But i'm having problems diplsying it. In the normal SAP report/print layout, if i  make the report based on the query it doesn't let me move the info from the repetitive area to the header....why.....can you get around this??? I then did it in the advanced layout but the first page is always wrong. What do you want to do with the variables?? what are you trying to achieve with the report because me and my coleagues have had a BIG problem with the ageing.

  • Guess I do need a little help with packages after all...

    Tried figuring in this out for the past 3 hours, various searches, scenarios etc...b4 posting....
    Okay, well....just like many aspects of this language, think I've got it down, and a
    new situation comes up where I can't implement it....in this case my own packages.
    (which is frustrating, but good because teaches troubleshooting, ingranes
    things into my peanut)
    Have done it before through tutorials...but now am having an issue...here we go:
    These are very small files..... 3 classes/one main
    http://www.cadenhead.org/book/24java/chapter10.shtml
    (see bottom for direct links)
    What I did first was put them in c:\java\2\modems
    compiled them all, everthing works great.
    #2
    I deleted the class files, and put all of the source into: c:\java\2\
    #3
    I edited the first 3 files to have the very first line ot each say:
    package com.modempack;
    No other edits, just this simple copy/paste at the top of each of those files
    #4
    For the file TestModems.java the only edit made was to put the following line at the top of the file:
    import com.modempack;
    #5 Compiled the first 3 files with the command "javac -d . FILENAME.java"
    they compile fine(you have to compile Modem.java 1st)
    #6 Try to compile the TestModems.java file with the same style or even just "javac Testmodems.java" and get the following error:
    C:\java\2>javac TestModems.java
    TestModems.java:1: package com does not exist
    import com.modempack;
    ^
    TestModems.java:5: cannot access CableModem
    bad class file: .\CableModem.java
    file does not contain class CableModem
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    CableModem roadRunner = new CableModem();
    ^
    2 errors
    It says package "com" does not exist" ...but it's created automatically when compiling the 1st 3 files....am at a lost.........could only think classpath issue somehow.....
    CableModem.java
    http://www.cadenhead.org/book/24java/source/chapter10/CableModem.java
    DslModem.java
    http://www.cadenhead.org/book/24java/source/chapter10/DslModem.java
    Modem.java
    http://www.cadenhead.org/book/24java/source/chapter10/Modem.java
    TestModems.java(the main app)
    http://www.cadenhead.org/book/24java/source/chapter10/TestModems.java

    Thank you for your response once again
    (assigned u the dukies from last thread)
    Argggghhhh!!!!! / Yippie Kayay!!!!!!!!!!!!!!
    Man oh man... HUGE headache....(wanting to studying the stuff from last post you helped on...having troubles with freaking packages SUCKS:) :) :)
    (but...will am learning, so that's good)
    Sooo....
    I put the actual ".java" files in the same directories, but that did not make a difference....
    So what I did was use the fully qualified /explicit name for each class.
    IE:
    import com.modempack;Gives the original 2 errors....that the above package does NOT exist??? wtf
    import com.modempack.*;Gives a single bad class erro
    Using either of the above and the following command:
    javac -classpath TestModems.javagives "no source files found"
    Using either of the above and the following command:
    javac -classpath c:\java\2\com\modems TestModems.javaYielded 5 errors of cannot resolve symbol
    Using: *****************************
    import com.modempack.Modem;
    import com.modempack.CableModem;
    import com.modempack.DslModem;and adding public in fron of the int[/code" variable....WORKS
    It is my understanding that
    import javax.swing.*;
    does NOT import everything with the swing library, so when thinking
    along those lines, this makes 100% sense....I just thought that with packages
    you could provide one, and everything else in the package is imported, ie: if you have a package with 500 classes in it, you wouldn't want 500 import lines....something seems like something
    must be wrong with the class files or something/classpath still or else this would work somehow???
    Well...going to go mess around somemore, just an update.
    Thank you again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help with bind variables

    Hello I'm new to .net and I'm trying to work with bind variables
    I keep getting the ORA-01036: illegal variable name/number error.
    here's my code, can somebody help me out and show me what am I doing wrong?
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim drLocation As OracleDataReader = getSCLocation("SOMEBODY")
    End Sub
    Private Function getSCLocation(ByVal contactName As String) As OracleDataReader
    Dim drLocation As OracleDataReader
    Dim connString As String = ConfigurationManager.ConnectionStrings("scConnString").ConnectionString
    Dim conn As New OracleConnection(connString)
    conn.Open()
    Dim queryString As String = "select a.location, a.location_name from locationm1 a where a.primary_contact_dept in (select b.dept from contactsm1 b where b.contact_name = p_contactName)"
    Dim p_contactName As New OracleParameter
    p_contactName.OracleType = OracleType.VarChar
    p_contactName.Value = contactName
    Dim cmdLocation As New OracleCommand(queryString, conn)
    cmdLocation.Parameters.Add(p_contactName)
    drLocation = cmdLocation.ExecuteReader(CommandBehavior.CloseConnection)
    Return drLocation
    End Function
    Thanks
    Peter

    never mind i got it by playing around with it
    had to change the way to start the bind variable
    Dim p_contactName As New OracleParameter("p_contactName", OracleType.VarChar)
    p_contactName.Size = 140
    p_contactName.Value = contactName

  • Help with ynamic variable evaluation

    Hi guys,
    If someone can point me out to how to evaluate variables as
    part of an expression.
    for ex:
    event.result.reporting.series[0].eval("y"+j+"Label");
    basically how do i write the equivalent of eval in
    flex/actionscript
    Thanks a ton,
    Pranay

    Thanks Greg, saved my day................
    1 more question
    Problem:
    My flex httpservice returns an xml file in the "object"
    resultFormat.
    How could I get the count of all childNodes of an object in
    that returned object tree.
    For example, in the xml file below:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reporting>
    <series>
    <title>Edge Page Views, in Page Views per
    Second</title>
    <xLabel>startdatetime</xLabel>
    <y1Label>sum(pageviews)</y1Label>
    <data>
    <x>1216233600</x>
    <y1>79.605</y1>
    </data>
    <data>
    <x>1216233900</x>
    <y1>78.076</y1>
    </data>
    </series>
    <series>
    <title>Total Bandwidth, in Mbits per
    Second</title>
    <xLabel>startdatetime</xLabel>
    <y1Label>sum(egress_bytes_mbps)</y1Label>
    <y2Label>combined_midgress_bytes_mbps</y2Label>
    <y3Label>ovh_bytes_mbps</y3Label>
    <y4Label>sum(ingress_bytes_mbps)</y4Label>
    <data>
    <x>1216233600</x>
    <y1>36.160352</y1>
    <y2>66.48362700000001</y2>
    <y3>66.48362700000001</y3>
    <y4>96.01235200000002</y4>
    </data>
    <data>
    <x>1216233900</x>
    <y1>34.260794</y1>
    <y2>62.10649799999999</y2>
    <y3>62.10649799999999</y3>
    <y4>88.902323</y4>
    </data>
    <data>
    <x>1216234200</x>
    <y1>35.329617</y1>
    <y2>62.77339099999999</y2>
    <y3>62.77339099999999</y3>
    <y4>89.30751</y4>
    </data>
    </series>
    </reporting>
    The first series element has 4 children
    I am able to get the number of data elements as:
    "resultObj.reporting.series[0].data.length"
    How do I effectively retreive:
    "resultObj.reporting.series[0].childNodes().length"
    Apparently this does'nt work, I also tried Nodes, children().
    Any documentation or help with this would be awesome
    Thanks a ton
    Pranay

  • Need help with accesing variable with xpath.

    Hi All,
    I need help with xpath in "Switch" BPEL construct. Switch is used to compare value assigned to output vairable and follow one path for "Deny" and another for "Approve". The following is data type for output variable.
    <element name="processResponse">
         <complexType>
              <sequence>
                   <element name="result" type="string"/>
              <sequence>
         <complexType>
    </element>
    The following expressions in Switch statement throw lava.lang.Exception. It error is xpath internal error".
    x20:compare('Deny',$outputvariable.payload/client:result)
    x20:compare('Deny',bpws:getVariableData('outputvariable','payload','/client:processResponse/client:result')
    It works with x20:compare('Deny','Deny'). So I assumed it must be accessing the variable.
    Any help greatly appreciated.
    Thanks,
    Satish

    Cany you try the following
    x20:compare('Deny',string($outputvariable.payload/client:result))
    x20:compare('Deny',string(bpws:getVariableData('outputvariable','payload','/client:processResponse/client:result'))
    Regards
    Albin I
    http://www.albinsblog.com/

  • Please help with Load Variables / ASP

    Hello,
    I am using Load Variables to retreive a variable from an ASP
    page, (which uses a response.write) to output the variable
    getfile.onRelease = function()
    myData = new LoadVars();
    myData.onLoad = function(success){
    if(success) {
    getfile_txt.text = this.strString;
    } else {
    getfile_txt.text = "error";
    myData.load("sendFile.asp");
    stop();
    the problem is that the output says "undefined", but when I
    access the .asp page through my web browser I get the expected
    result of the variable which is "Test1.Doc"
    if any1 can help with this, i would be massivley thankful,
    thanks.

    p.s strString is the variable that I am trying to pass from
    the ASP page.

  • Help with packages and classpath

    Heya,
    first off, i use textpad to compile my java, i don't do it via the command line.
    my problem is faily simple, i think. i've got a main class and i'd like it to import a custom class from a subdir.
    Main class is in
    C:\Documents and Settings\David\Desktop\java\test_gen.java
    I would like it to import
    C:\Documents and Settings\David\Desktop\java\obj_data\objects.java
    I understand that I have to declare objects.java to be a part of a package, so i head the code with: package obj_data; as i understand it, the directory in which the package to be imported resides in will be named the same as the package.
    When i import my package into test_gen.java, i import obj_data as follows:
    import obj_data.*;
    this should import objects.class and any other classes in the same directory. also import obj_data.objects.*; could be used.
    Anyway, thats my understanding of how you set up the class and package; i also understand that when the java file compiles the compiler looks at the directoy(s) indicated in the class path for the classes to import. that in mind i tried to add:
    C:\Documents and Settings\David\Desktop\java\obj_data\
    to my classpath. i did this via dos, javac -classpath "C:\Documents and Settings\David\Desktop\java\obj_data\"
    i got no error messages, so i assume it worked. however when i try to compile the main java (test_gen) i get-
    package packages does not exist
    import packages.*;
    ^
    1 error
    Tool completed with exit code 1
    can anyone give me some help please?

    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

  • Need help with maintaining variable choices in new session

    I have a flash app. set up with several variables. Is there a
    simple action script that will allow the user to maintain their
    choices after closing the .swf and re-launching it?
    Thanks in advance for your help.

    how are you checking if those components have been checked or
    ticked. actually, i probably don't want to know that.
    you really should be using a listener to detect when your
    components have changed and then you can use the changed method to
    set your variables and update your sharedobject.

  • A little bit of help with Bind variables please

    Hi,
    I am having a bit of trouble with bind variables I have been looking at the Dev guide and the forum to try and achieve this and it is still not happening for me, could anybody please help or point me in the right direction:
    I have created a simple PersonVO with the basic query:
    Select distinct full_name from xxml_people where person_id = :1
    In the PersonVOImpl.java I have added the method:
    public void initQuery(String personId)
    Number person = null;
    try
    person = new Number(personId);
    catch
    (Exception e){}
    setWhereClauseParam(1,person);
    executeQuery();
    Then in the PersonAM I have added the method:
    public void initPersonQuery(String personId)
    getPersonVO1().initQuery(personId);
    I then call this method in my processRequest section of my page controller:
    PersonAMImpl am = (PersonAMImpl) pageContext.getRootApplicationModule();
    String personId = "581";
    am.initPersonQuery(personId);
    When I try and run this I get the error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT distinct full_name from xxml_absence_calendar where person_id = :1
    java.sql.SQLException: ORA-01006: bind variable does not exist
    Am I binding the variables correctly? Or am I making some stupid mistake?
    I am ultimately looking to create a messageChoice where the logged in user will see a list of all organisations underneath him and the one level above. I plan to do this by passing the User’s Organisation name into a VO query using the organisation as a Bind Variable. I think once I have worked out how to bind variables this should be straight forward.
    Many Thanks

    Even though the parameter binding values may be same, you should never use the positional param more than once. So always go for the format
    select distinct full_name from xxml_people where supervisor_id = :1
    UNION
    select distinct full_name from xxml_people where person_id = :2
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please help with package body

    Hi This is my package veriable and body is created, but when I try to create a package body, it shows error
    {CREATE or replace PACKAGE crime_type AS
       FUNCTION tot_no_of_crime(CRIME_TYPE_ID NUMBER,CRIME_TYPE_DESC VARCHAR2, REPORTED_CRIME_ID NUMBER,DATE_REPORTED DATE,
    CRIME_POSTCODE VARCHAR2,DATE_CLOSED DATE,FK1_CRIME_TYPE_ID NUMBER,FK2_STATION_ID VARCHAR2)
          RETURN NUMBER;
       FUNCTION create_CRIME_TYPE(CRIME_TYPE_DESC VARCHAR2, CRIME_TYPE_ID NUMBER)
          RETURN NUMBER;
       PROCEDURE remove_PL_CRIME_TYPE1(CRIME_TYPE_ID NUMBER);
       PROCEDURE remove_PL_REPORTED_CRIME1(REPORTED_CRIME_ID NUMBER);
       PROCEDURE increase_CRIME_TYPE(CRIME_TYPE_ID NUMBER,CRIME_TYPE_DESC VARCHAR2);
       PROCEDURE increase_REPORTED_CRIME( CRIME_TYPE_ID NUMBER, REPORTED_CRIME_incr NUMBER);
          no_REPORTED_CRIME EXCEPTION;
          no_CRIME_TYPE EXCEPTION;
    END crime_type;}
    package body is
    {CTFUNCTION initialise_crime_types
    return NUMBER is
    total number;
    begin
          select count(*) into total from PL_CRIME_TYPE1;
          return(total);
    End;
    FUNCTION REPORTED_CRIME
       (REPORTED_CRIME_ID NUMBER,
      DATE_REPORTED  DATE,
        CRIME_POSTCODE VARCHAR2 ,
        CRIME_STATUS VARCHAR2 ,
        DATE_CLOSED DATE ,
        FK1_CRIME_TYPE_ID NUMBER,
        FK2_STATION_ID VARCHAR2)
    RETURN NUMBER IS
       new_reported_crime_id NUMBER(3);
    BEGIN
       SELECT crimetypeseq.NEXTVAL
          INTO new_reported_crime_id
          FROM DUAL;
       INSERT INTO PL_REPORTED_CRIME1(REPORTED_CRIME_ID, DATE_REPORTED, CRIME_POSTCODE, CRIME_STATUS, DATE_CLOSED, FK1_CRIME_TYPE_ID, FK2_STATION_ID)
          VALUES (REPORTED_CRIME_ID, DATE_REPORTED, CRIME_POSTCODE, CRIME_STATUS, DATE_CLOSED, FK1_CRIME_TYPE_ID, FK2_STATION_ID);
             tot_reported_crimes := tot_reported_crimes + 1;
       RETURN(new_CRIME_TYPE_ID);
    END;
    FUNCTION create_CRIME_TYPE(CRIME_TYPE_DESC VARCHAR2)
           RETURN NUMBER IS
          new_crime_type_id NUMBER(38,0);
       BEGIN
          SELECT  crimetypeseq.NEXTVAL;
             INTO new_crime_type_id
             FROM DUAL;
          INSERT INTO PL_CRIME_TYPE1
             VALUES (CRIME_TYPE_ID CRIME_TYPE_DESC );
                tot_crime_types := tot_crime_types + 1;
          RETURN(new_reported_crime_id);
       END;
    PROCEDURE remove_crime_types(crime_type_id NUMBER) IS
       BEGIN
          DELETE FROM PL_CRIME_TYPE1
          WHERE PL_CRIME_TYPE1.crime_type_id = remove_PL_CRIME_TYPE1.crime_type_id;
             tot_no_of_crimes := tot_no_of_crimes - 1;
       END;
    PROCEDURE remove_reported_crimes(reported_crime_id NUMBER) IS
       BEGIN
          DELETE FROM PL_REPORTED_CRIME1
          WHERE PL_REPORTED_CRIME1 .reported_crime_id = remove_PL_REPORTED_CRIME1.reported_crime_id;
             tot_reported_crimes := tot_reported_crimes - 1;
          SELECT COUNT(*)
             INTO tot_crime_types
             FROM PL_CRIME_TYPE1;
    End;
    PROCEDURE increase_crime_type(CRIME_TYPE_ID NUMBER,CRIME_TYPE_DESC VARCHAR2) IS
       curr_ crime_typeNUMBER(7,2);
       BEGIN
          SELECT crime_type
          INTO curr_crime_type
          FROM PL_CRIME_TYPE1
          WHERE PL_CRIME_TYPE1.crime_type_id = increase_crime_type.crime_type_id;
          IF curr_crime_type IS NULL
             THEN RAISE no_crime_type;
          ELSE
             UPDATE PL_CRIME_TYPE1
             SET crime_type = crime_type + crime_type_incr
             WHERE crime_type_id = crime_type_id;
          END IF;
       END;
    PROCEDURE increase_reported_crime(CRIME_TYPE_ID NUMBER, REPORTED_CRIME_incr NUMBER) IS
          curr_reported_crime NUMBER(7,2);
       BEGIN
          SELECT reported_crime
          INTO curr_reported_crime
          FROM PL_REPORTED_CRIME1
          WHERE PL_REPORTED_CRIME1.crime_type_id = increase_reported_crime.crime_type_id;
          IF curr_reported_crime IS NULL
             THEN RAISE no_reported_crime;
          ELSE
             UPDATE PL_REPORTED_CRIME1
             SET reported_crime = reported_crime + reported_crime_incr;
          END IF;
       END;
    BEGIN
    select count(*) into tot_crime_types from PL_CRIME_TYPE1;
          select count(*) into tot_reported_crimes from PL_REPORTED_CRIME1;
    tot_crime_types := initialise_crime_types();
    tot_reported_crimes:= initialise_tot_reported_crimes();
    END;}

    Ganesh Ji Namaste
    I have changed my Package variable. My new veriable is
    {CREATE or replace PACKAGE crime_type AS
       FUNCTION tot_no_of_crime_type(CRIME_TYPE_ID NUMBER,CRIME_TYPE_DESC VARCHAR2)
          RETURN NUMBER;
       FUNCTION CREATE_REPORTED_CRIME(REPORTED_CRIME_ID NUMBER,DATE_REPORTED DATE,CRIME_POSTCODE VARCHAR2,CRIME_STATUS VARCHAR2,DATE_CLOSED DATE,FK1_CRIME_TYPE_ID NUMBER,FK2_STATION_ID NUMBER)
          RETURN NUMBER;
       PROCEDURE remove_PL_CRIME_TYPE1(CRIME_TYPE_ID NUMBER);
       PROCEDURE remove_PL_REPORTED_CRIME1(REPORTED_CRIME_ID NUMBER);
       PROCEDURE increase_CRIME_TYPE(CRIME_TYPE_ID NUMBER,CRIME_TYPE_DESC VARCHAR2);
       PROCEDURE increase_REPORTED_CRIME( CRIME_TYPE_ID NUMBER, REPORTED_CRIME_incr NUMBER);
          no_REPORTED_CRIME EXCEPTION;
          no_CRIME_TYPE EXCEPTION;
    END crime_type;}
    and my body package is
    {CREATE OR REPLACE PACKAGE BODY crime_type AS
       tot_crime_types NUMBER;
       tot_reported_crimes NUMBER;
    FUNCTION initialise_crime_types
    return number is
    total number;
    begin
          select count(*) into total from PL_CRIME_TYPE1;
          return(total);
    End;
    FUNCTION initialise_reported_crimes
    return number is
    total number;
    begin
          select count(*) into total from PL_REPORTED_CRIME1;
          return(total);
    End;
    FUNCTION tot_no_of_crime_type
       (CRIME_TYPE_ID NUMBER,
        CRIME_TYPE_DESC VARCHAR2)
    RETURN NUMBER IS
       new_crime_type_id NUMBER(38,0);
    BEGIN
       SELECT crimetypeseq.NEXTVAL
          INTO new_crime_type_id
          FROM DUAL;
       INSERT INTO PL_CRIME_TYPE1(CRIME_TYPE_ID, CRIME_TYPE_DESC)
          VALUES (new_CRIME_TYPE_ID, CRIME_TYPE_DESC);
             tot_crime_types := tot_crime_types + 1;
       RETURN(new_CRIME_TYPE_ID);
    END;
    FUNCTION CREATE_REPORTED_CRIME(REPORTED_CRIME_ID NUMBER,DATE_REPORTED DATE,CRIME_POSTCODE VARCHAR2,CRIME_STATUS VARCHAR2,DATE_CLOSED DATE,FK1_CRIME_TYPE_ID NUMBER,FK2_STATION_ID NUMBER)
       RETURN NUMBER IS
          new_reported_crime_id NUMBER(38,0);
       BEGIN
          SELECT reportedcrimeseq.NEXTVAL
             INTO new_reported_crime_id
             FROM dual;
          INSERT INTO PL_REPORTED_CRIME1
             VALUES (new_reported_crime_id,REPORTED_CRIME_ID,DATE_REPORTED,CRIME_POSTCODE,CRIME_STATUS,DATE_CLOSED,FK1_CRIME_TYPE_ID,FK2_STATION_ID);
                tot_reported_crimes := tot_reported_crimes + 1;
          RETURN(new_reported_crime_id);
       END;
    PROCEDURE remove_crime_types(crime_type_id NUMBER) IS
       BEGIN
          DELETE FROM PL_CRIME_TYPE1
          WHERE PL_CRIME_TYPE1.crime_type_id = remove_PL_CRIME_TYPE1.crime_type_id;
             tot_crime_types := tot_crime_types - 1;
       END;
    PROCEDURE remove_reported_crimes(reported_crime_id NUMBER) IS
       BEGIN
          DELETE FROM PL_REPORTED_CRIME1
          WHERE PL_REPORTED_CRIME1 .reported_crime_id = remove_PL_REPORTED_CRIME1.reported_crime_id;
             tot_reported_crimes := tot_reported_crimes - 1;
          SELECT COUNT(*)
             INTO tot_crime_types
             FROM PL_CRIME_TYPE1;
    End;
    PROCEDURE increase_crime_type(CRIME_TYPE_ID NUMBER,CRIME_TYPE_DESC VARCHAR2) IS
       curr_ crime_typeNUMBER(38,0);
       BEGIN
          SELECT crime_type
          INTO curr_crime_type
          FROM PL_CRIME_TYPE1
          WHERE PL_CRIME_TYPE1.crime_type_id = increase_crime_type.crime_type_id;
          IF curr_crime_type IS NULL
             THEN RAISE no_crime_type;
          ELSE
             UPDATE PL_CRIME_TYPE1
             SET crime_type = crime_type + crime_type_incr
             WHERE crime_type_id = crime_type_id;
          END IF;
       END;
    PROCEDURE increase_reported_crime(CRIME_TYPE_ID NUMBER, REPORTED_CRIME_incr NUMBER) IS
          curr_reported_crime NUMBER(7,2);
       BEGIN
          SELECT reported_crime
          INTO curr_reported_crime
          FROM PL_REPORTED_CRIME1
          WHERE PL_REPORTED_CRIME1.crime_type_id = increase_reported_crime.crime_type_id;
          IF curr_reported_crime IS NULL
             THEN RAISE no_reported_crime;
          ELSE
             UPDATE PL_REPORTED_CRIME1
             SET reported_crime = reported_crime + reported_crime_incr;
          END IF;
       END;
    BEGIN
    select count(*) into tot_crime_types from PL_CRIME_TYPE1;
          select count(*) into tot_reported_crimes from PL_REPORTED_CRIME1;
    tot_crime_types := initialise_crime_types();
    tot_reported_crimes:= initialise_reported_crimes();
    END;}
    Could You please check is that correct or not?
    Thanks in advance for your time and co-operation
    Rubel Roy

  • Help with Package Label Design

    Hi, I work for a one of the fortune 500 company as a helpdesk. Last month my company came out with a go green logo and when I saw I decide to create one. I showed the logo to my Director and my director forwarded the design to the Marketing department. They really like the design, but they couldn't use it because they already pay a design company for that logo and the logo were already print on the market. What happen next, is that they send me an email Yesterday asking me if I'm interest in getting an interview for a packaging designer job and the interview is going to be for next month. Now, I have no experience with packaging, label and printing and they know that, but I will like to surprise the with couple of design. I would like to know what software do I need to use from design to printing and if there is any good website with good tutorials. Thanks

    They probably liked your style ( on the green logo ) and want to incorporate it into their packaging.  You should be honest and tell them you do not have any experience.  They'll probably bring you in at "entry level" so they can groom you to their corporate culture.  You'll probably be working under a senior designer and will probably spend a few months learning how things are done.  I'd imagine you'll need some basic knowledge of Illustrator and Photoshop, if not some intermediate level capabilities with both programs.
    Now, if you want to impress them, find a current package the company had produced in the last few years.  Pull it apart and get it to lie flat.  Re-create the entire piece using Illustrator.  This will include a spot layer with dies.  Focus on improving the design and look of the piece, but make sure you do not copy what has already been done.  Come up with something original and incorporate your version of the "green" logo.  It does not have to be anything out-of-sight, but shows you know the company, you know how to improve the existing packaging out there, and you'll show initiate.  They'll probably never use it ( like your "green" logo, but will get you the job ).
    This will take you some time.  I do not know of any web tutorials, but both Illustrator and Photoshop come with a few.  You could also go to a local bookstore and take alook at what they have in their "graphic design" section.  Some books come with a CD that has some templates and files you can take a look at.
    There must be a void they're looking to fill, otherwise you'd never get the interview.  Don't get too stressed out trying to impress them.  They're already impressed.  But, if you "claim" to know it all in software, you'll be doing yourself a huge injustice.  Talent does not come in a box.  Sounds like they're willing to get you started, so go for it.

  • Help with multiple variable

    I'm trying to write a query which pulls shipment information
    from an access database. Then it grabs the weight of each shipments
    and multiplies it by the corresponding rate depending on its weight
    class.
    I'm using the CFIF, CFELSEIF and CFSET tags to try to
    accopmlisht this, making it look something like this
    <CFIF "Shipments.weight" LT 500 >
    <cfset Shipments.rate = 7.5 >
    <CFELSEIF "Shipments.weight" GT 499 LT 1000 >
    <cfset Shipments.rate = 7 >
    <CFELSEIF "Shipments.weight" GT 999 LT 2000 >
    <cfset Shipments.rate = 6.5 >
    <CFELSEIF "Shipments.weight" GT 1999 LT 5000 >
    <cfset Shipments.rate = 5 >
    <CFELSEIF "Shipments.weight" GT 4999 >
    <cfset Shipments.rate = 3.65 >
    </CFIF>
    then in the Output tag I use this CFSCRIPT
    <cfscript>
    WriteOutput(#ACC_Report.weight#/100*#Shipments.rate#);
    </cfscript>
    It runs fine but it only seems to grab either the first or
    the second set rate variables and multiplies all the weights in the
    output query by it, inetead of logically choosing its weight class.
    Any help, perhaps I'm using the wrong logic.
    Thanks in advance

    "There's no such thing as "greater-than-ness" on string data"
    Adam, everything you said is basically true and relevant to
    the original
    poster's issue. But this line is wrong is it not? Isn't
    comparing one
    string to another and determining which is greater or lesser
    the essence
    of sorting a set of strings into an alphabetical order?
    Now, I am not sure I can remember the last time I had to
    write my own
    sort routine. But I am pretty sure when I did for sorting
    string data,
    I communally compared one to another to see which was greater
    and|or
    lesser then the other.
    To reiterate in the original post, the person is comparing
    the string
    constants "Shipments.weight" to the numbers do to the
    improper quotes,
    not the value in the Shipments.weight variable.
    Also, if one cares, the logic could be greatly simplified
    with some
    basic boolean logic. The lower range comparisons are
    unnecessary.
    <CFIF Shipments.weight LT 500 >
    <!--- weight is less then 500 --->
    <cfset Shipments.rate = 7.5 >
    <CFELSEIF Shipments.weight LT 1000 >
    <!--- weight is greater then equal to 500 it was not
    caught in first
    branch, but it is also less then 1000 --->
    <cfset Shipments.rate = 7 >
    <CFELSEIF Shipments.weight LT 2000 >
    <!--- weight is greater then equal to 1000 it was not
    caught in any
    previous branch, but it is also less then 2000--->
    <cfset Shipments.rate = 6.5 >
    <CFELSEIF Shipments.weight LT 5000 >
    <!--- weight is greater then equal to 2000 it was not
    caught in any
    previous branch, but it is also less then 5000--->
    <cfset Shipments.rate = 5 >
    <CFELSE>
    <!--- weight is greater then equal to 5000 it was not
    caught in any
    previous branch--->
    <cfset Shipments.rate = 3.65 >
    </CFIF>

  • Help with using variable for name of table in PLSQL block...

    I am trying to use a variable for the name of a table but getting errors ...i am sure I am close to the correct form here but something is wrong. I sure would appreciate some help!
    DECLARE
    ln_month Number;
    ln_day Number;
    ln_year Number;
    ls_year VarChar2(4);
    ls_prev_table VarChar2(30);
    ls_cur_table VarChar2(30);
    ln_prev_year Number;
    ls_prev_year VarChar2(4);
    ln_prev_month Number;
    BEGIN
    Select To_Number(To_Char(sysdate, 'MM')) into ln_month from dual;
    Select To_Number(To_Char(sysdate, 'DD')) into ln_day from dual;
    Select To_Number(To_Char(sysdate, 'YYYY')) into ln_year from dual;
    If ln_month = 01 Then
    ls_cur_table := "T_CPRS_FDW_CUR_JAN_ACTUALS";
    ls_prev_table := "T_CPRS_FDW_PREV_DEC_ACTUALS";
    ln_prev_year := ln_year - 1;
    /***above is where I am trying to use variables for assignement to years and months tables***//// ln_prev_month := 12;
    End If;
    /*------MORE IF STATEMENTS FOR EACH MONTH ---OF --THE YEAR ...AND its the following 2 variable statements that the compiler doesnt like! */
    If ln_day < 20 Then
    Delete from :ls_prev_table;
    INSERT INTO :ls_prev_table /*(STUFF TO BE INSERTED GOES HERE)*/
    HELP PLEASE!
    null

    Hi,
    The parser does not under variables directly in dml statements.u need to form a statement and the parse and execute the same...
    so the soln is
    Declare
    lv_stmt varchar2(250);
    Begin
    lv_stmt := 'Delete from '&#0124; &#0124;ls_prev_table;
    execute immediate lv_stmt;
    -- Same is the case with the insert stmt--
    End;
    This should solve ur problem.
    u could also give a direct call like
    execute immediate 'Delete from '&#0124; &#0124;ls_prev_table ;
    Note: This statement "execute immediate" holds good for oracle versions 8.x and above which makes the stmt very simple. For lower version u need to use the dbms_sql package to parse and execute the statement which has a series of statements for the same.
    Kiran

  • Help with bind variable

    I am very new to this site so I hope I get the format right...
    I am using Oracle Application Express Edition and trying to answer a question for my class, but I keep getting the same error every time. I've looked it up and it's apparently a storage error, but I don't understand how it can be a storage error if I'm not able to store it in the first place. So confused! Please help!
    Here's my code and the error I keep getting:
    DECLARE
    VARIABLE b_basic number
    VARIABLE b_pf number
    today DATE:=SYSDATE;
    tomorrow today%TYPE;
    BEGIN
    b_basic:=45;
    b_pf:=12;
    tomorrow:=today +1;
    DBMS_OUTPUT.PUT_LINE(' Hello World ');
    DBMS_OUTPUT.PUT_LINE('TODAY IS : '|| today);
    DBMS_OUTPUT.PUT_LINE('TOMORROW IS : ' || tomorrow);
    END;
    ORA-06550: line 2, column 23: PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following: := . ( @ % ; not null range default character
    --------------------------------------------------------------------------------

    Don't mix SQL*Plus and PL/SQL syntax. In PL/SQL there is no VARIABLE keyword, just remove it.
    See http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/fundamentals.htm#LNPLS208.
    With this:
    set echo on
    set serveroutput on
    DECLARE
    b_basic number;
    b_pf number;
    today DATE:=SYSDATE;
    tomorrow today%TYPE;
    BEGIN
    b_basic:=45;
    b_pf:=12;
    tomorrow:=today +1;
    DBMS_OUTPUT.PUT_LINE(' Hello World ');
    DBMS_OUTPUT.PUT_LINE('TODAY IS : '|| today);
    DBMS_OUTPUT.PUT_LINE('TOMORROW IS : ' || tomorrow);
    END;
    /you get with SQL*Plus command line:
    SQL> set serveroutput on
    SQL> --
    SQL> DECLARE
      2  b_basic number;
      3  b_pf number;
      4  today DATE:=SYSDATE;
      5  tomorrow today%TYPE;
      6  BEGIN
      7  b_basic:=45;
      8  b_pf:=12;
      9  tomorrow:=today +1;
    10  DBMS_OUTPUT.PUT_LINE(' Hello World ');
    11  DBMS_OUTPUT.PUT_LINE('TODAY IS : '|| today);
    12  DBMS_OUTPUT.PUT_LINE('TOMORROW IS : ' || tomorrow);
    13  END;
    14  /
    Hello World
    TODAY IS : 05-FEB-13
    TOMORROW IS : 06-FEB-13
    PL/SQL procedure successfully completed.Try to post APEX specific questions in APEX dedicated forum Oracle Application Express (APEX)
    Edited by: P. Forstmann on 5 févr. 2013 13:38
    Edited by: P. Forstmann on 5 févr. 2013 13:40

Maybe you are looking for

  • "Can't find dependent libraries" Query

    I created a sample.dll using VC++ which inturn uses java libraries. I was getting 'file.obj : error LNK2001: unresolved external symbol __imp__JAWT_GetAWT@8' link error while creating sample.dll even after providing jawt.dll path. So used jre/lib/jaw

  • Dont work notification sound on blurtooth head set

    help  notification No sound is heard in the z30 / plantronics legend hd blackberry. Body only speaker. specification of os10? No problem priority headset. Notification might sound, or sounds from the headset If you change the settings of where? my us

  • I want to remove all itunes stuff and re install them but it tells me error 2203and I can not take it off

    I am trying to get a fresh start on the itunes, we have 2 ipods and 2 iphones in the family and somehow all the stuff is in one itunes this, also when I plug in my daughters ipod it does not come up. Is it this laptop? I am trying to add her iphone a

  • Is ASAP  part of Solution manager or bothe are different

    hai to everybody, when we are in implementation we have to use either ASAP methodology or Solution Manager, the question is Is ASAP methodology a part of Solution manager or both are different Can any one tell me even Schedule manager also suitable a

  • Problem with updating AIR app

    I've had updating working fine until I recently started using a secure digital certificate. I realize that I can't update from the an old version that had the certificate I generated myself, but even after uninstalling the old version and installing