Help creating a simple function testing conditions in 2 columns

I want to create a simple function which tests if a value is found in one of two columns:
If MyValue is in columnA or ColumnB then True ELSE False
Any ideas?

Ok, This is the deal. This has been kicking my butt all day. So here is the exact table names and view names and all the columns involved.
The table I am inserting into only after I determine that the concatenated string is not there either "forward" or "backwards."
RPT_DS1_ALOC_ZLOC_REVERSE_VW:
ALOC VARCHAR2(8)                 Data looks like 'AFD32GD2'
ZLOC VARCHAR2(8)                 Data looks like 'AFD55GDF'
MASTER_ROUTE_NAME VARCHAR(17)      Data looks like 'AFD32GD2-AFD55GDF'
REVERSED       VARCHAR(17)      Data looks like 'AFD55GDF-AFD32GD2'
This view is built off another table that has only the ALOC and ZLOCsSELECT * FROM RPT_DS1_ALOC_ZLOC_REVERSE_VW WHERE ROWNUM <=5;
MASTER_ROUTE_NAME     REVERSED          ALOC          ZLOC
ABDLFLXA-ABDLFLXA     ABDLFLXA-ABDLFLXA     ABDLFLXA     ABDLFLXA
AGSTGAAU-AGSTGAAU     AGSTGAAU-AGSTGAAU     AGSTGAAU     AGSTGAAU
AGSTGAFL-AGSTGAFL     AGSTGAFL-AGSTGAFL     AGSTGAFL     AGSTGAFL
AGSTGAMT-AGSTGAAU     AGSTGAAU-AGSTGAMT     AGSTGAMT     AGSTGAAU
AGSTGAMT-AGSTGAFL     AGSTGAFL-AGSTGAMT     AGSTGAMT     AGSTGAFL
RATE_MASTER_ROUTE:
MASTER_ROUTE_NAME VARCHAR2(17)   Data looks like 'AFD32GDS-AFD55GDF' or 'AFD55GDF-AFD32GDS'
ALOC VARCHAR2(8)                 Data looks like 'AFD32GD2'
ZLOC VARCHAR2(8)                 Data looks like 'AFD55GDF'SELECT * FROM RATE_MASTER_ROUTE WHERE ROWNUM <=5;
MASTER_ROUTE_NAME     ALOC          ZLOC
ABDLFLXA-ABDLFLXA     ABDLFLXA     ABDLFLXA
AGSTGAAU-AGSTGAAU     AGSTGAAU     AGSTGAAU
AGSTGAFL-AGSTGAFL     AGSTGAFL     AGSTGAFL
AGSTGAMT-AGSTGAAU     AGSTGAMT     AGSTGAAU
AGSTGAMT-AGSTGAFL     AGSTGAMT     AGSTGAFThe idea is to insert a record into RATE_MASTER_ROUTE ONLY if it is not in there already. So since the view takes care of the reversing, all I am doing is passing in the MASTER_ROUTE_NAME and the REVERSED to see if either of them are in RATE_MASTER_ROUTE. If not, then I am INSERTING both the ALOC and ZLOC and the MASTER_ROUTE_NAME into RATE_MASTER_ROUTE. I appreciate the help so far, but I am still missing something. I have tried a number of variations. I added a dummy record to the first table that I knew was not in the second. I tried selecting it according to a similar query that was made above. But I am not communicating something correctly so this is the detail. I hope somebody can help me over this brain freeze.

Similar Messages

  • Error while creating a simple function, procedure or triger in Oracle8i Lite

    Hi,
    I have Oracle8i Lite release 4.0.
    While creating a simple proceudre/function/trigger on the database, it's throwing the following error:
    create or replace function test return number is
    ERROR at line 1:
    OCA-30021: error preparing/executing SQL statement
    [POL-5228] syntax error
    Here is my sample code.
    create or replace function test return number is
    begin
    return 0;
    end;
    Tried to create the same function in the user SYSTEM too but got the same error message.
    Thanks in advance for the soluton.
    null

    I just started with 8i Lite, but as far as I know 8i Lite does not support PL/SQL code.
    So you have to write your triggers and stored procedures in Java.
    Ciao

  • Help with this cool function: =SUMIF(Table 1::$Month, COLUMN()−1, $Cost)

    Hello,
    I am a novice with respect to spreadsheet functions and needed a a cashflow spreadsheet.  I found this one (Download Cashflow Tracker for Numbers (iWork 09).) which is perfect but the author, I suspect, has not updated his website in years.  I attempted contacting him and received no reply.
    I receive an error with the following function:
    =SUMIF(Table 1::$Month, COLUMN()−1, $Cost)
    This occurs when I enter a date in the expense or income table.  Entering the date is required to make the spreadsheet work but when I do I receive an error that a number is expected when a date is entered.
    Can anyone give me some advice?  I would really like to use this spreadsheet.
    Thanks!
    Steve

    What I have found the simplest approach has been:
    1. Cut the Summary by Category table and paste it into the Transaction sheet, giving something like this (after rearranging renaming, etc, as desired):
    2. Make sure the links between the two table are still working, make their appearance the way you like, then duplicate that sheet for the other months.  Each sheet will then have its separate set of two interconnected tables.
    3. Copy paste one of the Summary tables back to the Summary sheet, rename it as desired, and set it up with formulas referencing the tables in the monthly sheets you have set up, something like this:
    If you want your summary by month you would set up 12 columns in the main 'Summary by Category' table, with each column referencing a different sheet.  Your Budget could be a row above each Actual figure, if you like, with difference in a row below that.
    This approach keeps the formulas simple and avoids having to set up fancy SUMIFS extracting data for each month from one big Transaction table.
    SG

  • Need help creating a simple form in Dreamweaver CS3!!

    I'm trying to create a form in Dreamweaver CS3, and while I have the form built I'm confused as to how to make it actually function.  What I'm trying to do is create a form that when the visitor clicks submit, the data is emailed to me.  Can someone help me figure out how to accomplish this?
    Thanks so much!

    Ute's answer is spot on - you need a FormMail script to process the form.  Check with your host (or via the control panel) and see if they supply such a form for free.
    If not, google for "formail script' and you'll find quite a few available - all free to use.
    You just need to add a couple of lines to your html code, change a few things in the formmail script and the form will process.  Sounds complicated but most scripts come with a help file to help you get off the ground.
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/
    http://twitter.com/nadiap

  • Hi, In need of help creating a simple effect to image.

    Attached is an image which shows more or less the effect I am needing to achieve.
    http://i303.photobucket.com/albums/nn149/Jaybeedubya/FotoliaComp_635945_xs3N3VFLwPNTIOm1.j pg
    I created the image above by desaturating the colour image of the man and then adding a new purple layer and selecting 'vivid light' from the layer palette drop down box. In doing this the man became purple but the white area surrounding him stayed white...I then adjusted the layers on the first layer so that the white part became purple - the final result is what you see in the attached image.
    The problem is this - I need to create this effect for 15 or so images all with a specific purple pantone colour, I need to create these for print ready artwork. All the pictures (ie the man) I will be using, need to look the same kind of shade. The way I was creating these before was to adjust the bottom layer so its grey rather than white so that the white area becomes purple.
    Confusing huh, If you dont understand my question (and I dont blame you!) then all I need is to create a set of 15 images that look like the attached image (using a specific pantone) but I have no idea how the best way to do it is.
    How would you guys achieve that? Any help greatly appreciated.

    So its gonna be a two-color-job?
    Because with the extreme depths adding Black at least might be beneficial.
    You could make a Selection of a black&white-version-of-the-photographs luminance, inverse it and, in the Channels-Panels PopUp-menu, choose Add New Spot Channel for the Foreground color and select the Pantone color.
    Then Add New Spot Channel for the background-color and fill that solid black and hide the layers that contain the composite of the photograph.
    This should leave You with blank composite channels and the two Spot Channels visible.
    Indesign can handle either psd- or DCS2-files containing Spot Channels.
    The problem I perceive here is that depending on the print-process and the background color selected it might proof necessary to knock out the foreground elements if the company is very strict on their CI colors. Unfortunately simply inversing the foreground selection would probably not work as this might leave the mixed-color-areas greyish.
    Are the prints gonna be offset or silkscreen?

  • Help creating a simple browser

    I've created an e-commerce application using servlets, now I'm trying to build a simple browser to view these servlets. I've made a very simple one that works for the most part, except when comes to buttons (submit type inputs) within the html, like the one below:
    out.println("<TD><FORM ACTION=\"" +Orders+ "\">\n" +
    "<INPUT TYPE=\"HIDDEN\" NAME=\"ItemId\"VALUE=\"" +temp.getItemId( + "\">\n" +
    "<P>\n<CENTER>\n" +
    "<INPUT TYPE=\"SUBMIT\" NAME=\"Operation\"VALUE=\"Delete\">\n" +
    "</CENTER>\n<P>\n</FORM></TD></TR>");clicking on the button simply does nothing, what do I have to do to make the browser use these buttons correctly. Here's the code for my browser so far:
    package project;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Browser extends JFrame
         public JEditorPane viewer;
         public JButton browse, search, view, checkout;
         public Browser()
         {     //create the components that make up the browser
              super("Project Browser");
              browse = new JButton("Browse stock");
              search = new JButton("Search");
              view = new JButton("View basket");
              checkout = new JButton("Proceed to checkout");
              JToolBar bar = new JToolBar();
              bar.add(browse);
              bar.add(search);
              bar.add(view);
              bar.add(checkout);
              viewer = new JEditorPane();
              viewer.setEditable(false);
              //get a container and place the components on it
              Container c = getContentPane();
              c.setLayout(new BorderLayout());
              c.add(bar, BorderLayout.NORTH);
              c.add(new JScrollPane(viewer), BorderLayout.CENTER);
              viewer.addHyperlinkListener(new LinkListener(  ));
              setSize(800, 600);
              setVisible(true);
              String s = "http://localhost:8080/tomcat-docs/Selector.html";
             open(s);
           public void open(String url)
             try     {
                    URL page = new URL(url);
                    viewer.setPage(page);
             catch (Exception e) {
                    System.out.println("Couldn't open " +url+ ":" + e);
           class LinkListener implements HyperlinkListener
           {     public void hyperlinkUpdate(HyperlinkEvent he)
                {     HyperlinkEvent.EventType type = he.getEventType(  );
                    if (type == HyperlinkEvent.EventType.ENTERED)
                      viewer.setCursor(
                     Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                    else if (type == HyperlinkEvent.EventType.EXITED)
                      viewer.setCursor(Cursor.getDefaultCursor(  ));
                    else if (type == HyperlinkEvent.EventType.ACTIVATED)
                      open(he.getURL().toExternalForm(  ));
         public static void main(String[] args)
             new Browser();
    }

    Nothings wrong with them, its just part of a project. Just to clarify, I don't mean the buttons on the JToolBar, I know they do nothing. I mean buttons/forms within the html that the browser displays. It handles hyperlinks ok, but submit type forms don't seem to work.

  • Help creating a simple line graph

    Hi
    Im very new to the Java language, yet have some background knowledge of C and C++.
    i have a problem with an application i am developing for a university assignment, the program is to simply simulate a water pressured nuclear reaction. the main JFrame holds various JLabels that show the current core temperature, electricity produced etc. But i want to add a very simplistic line graph to the same window, it is to purely show a line that updates (no axis or labels). The graph is to illustrate how much electricity was produced on the current cycle of the reactor, the user can initiate each cycle by pressing a JButton.
    i have found some info on drawing, but cannot find anything that helps.
    Any info on how to do this (its only meant to be a samllish part of the main window), any code examples or sites that have a very relevant tutorial would be appreciated.
    Sorry for the length of this, and if anyone needs any more info on this then let me know.
    thanks

    Cross posted,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=394494&tstart=0&trange=15

  • Create simple function

    Hi all,
    how to create a simple function which returns value in one row and if there is no result returns output ("no data found").
    Select statement:
    select max(tran)
    from p6.trans
    I am quite new to pl/sql therefore any help would be appreciated.

    You dont need a function
    select nvl(max(tran),'no data found'))
    from p6.trans;
    "If tran is a number"
    select nvl(to_char(max(tran)),'no data found'))
    from p6.trans;
    "To add, if you expect NULL for tran
    select decode(count(*),0,'no data found',to_char(max(tran)))
    from p6.trans;
    {code}
    Edited by: jeneesh on Nov 14, 2012 6:04 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to make a simple function on the release of a mouse AS3.0?

    so its been a while since i have been Flash Professional and i am having to re-educate myself in alsmost everything. what i want to do is create a simple function of the release of a Mouse vs. the Click what is the access command of  on Release I know the click is MouseEvent.CLICK, function, but what is the on release access command?

    You probably want to use MouseEvent.MOUSE_UP (which is what happens to define the tail end of a CLICK event)

  • Help needed in creating a simple paint application

    I want to create a simple paint application using swings in java, i am able to draw different shapes using mouse but the problem is when i select some other shape it simply replaces the already drawn object with the new one but i want the already drawn object also, like appending, what should be done for this, any logic missing here or i should use some other approach?
    Please help me
    package test;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class bmp extends JFrame implements MouseListener, MouseMotionListener,
              ActionListener {
         int w, h;
         int xstart, ystart, xend, yend;
         JButton elipse = new JButton("--Elipse--");
         JButton rect = new JButton  ("Rectangle");
         JPanel mainframe = new JPanel();
         JPanel buttons = new JPanel();
         String selected="no";
         public void init() {
              //super("Bitmap Functions");
              // display.setLayout(new FlowLayout());
              buttons.setLayout(new BoxLayout(buttons,BoxLayout.Y_AXIS));
              buttons.add(Box.createRigidArea(new Dimension(15,15)));
              buttons.add(elipse);
              buttons.add(Box.createRigidArea(new Dimension(0,15)));
              buttons.add(rect);
              Container contentpane = getContentPane();
              contentpane.add(buttons, BorderLayout.WEST);
              //getContentPane().add(display, BorderLayout.WEST);
              addMouseListener(this); // listens for own mouse and
              addMouseMotionListener(this); // mouse-motion events
              setSize(1152, 834);
              elipse.addActionListener(this);
              rect.addActionListener(this);
              setVisible(true);
         public void mousePressed(MouseEvent event) {
              xstart = event.getX();
              ystart = event.getY();
         public void mouseReleased(MouseEvent event) {
              xend = event.getX();
              yend = event.getY();
              repaint();
         public void mouseEntered(MouseEvent event) {
              //repaint();
         public void mouseExited(MouseEvent event) {
              //repaint();
         public void mouseDragged(MouseEvent event) {
              xend = event.getX();
              yend = event.getY();
              repaint();
         public void mouseMoved(MouseEvent event) {
              //repaint();
         public static void main(String args[]) {
              bmp application = new bmp();
              application.init();
              application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public void mouseClicked(MouseEvent arg0) {
         public void actionPerformed(ActionEvent event) {
              if (event.getSource() == elipse) {
                   selected = "elipse";
                   repaint();
              else if(event.getSource() == rect)
                   selected = "rectangle";
                   repaint();
         public void paint(Graphics g) {
              System.out.println(selected);
              super.paint(g); // clear the frame surface
              bmp b=new bmp();
              if (selected.equals("elipse"))
                   w = xend - xstart;
                   h = yend - ystart;
                   if (w < 0)
                        w = w * -1;
                   if (h < 0)
                        h = h * -1;
                   g.drawOval(xstart, ystart, w, h);
              if (selected.equals("rectangle"))
                   w = xend - xstart;
              h = yend - ystart;
              if (w < 0)
                   w = w * -1;
              if (h < 0)
                   h = h * -1;
              g.drawRect(xstart, ystart, w, h);
    }

    bvivek wrote:
    ..With this code, when i draw an elipse or line the image doesnt start from the point where i click the mouse. It added the MouseListener to the wrong thing.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    public class test_bmp extends JPanel implements MouseListener,MouseMotionListener,ActionListener
           static BufferedImage image;
           Color color;
           Point start=new Point();
           Point end =new Point();
           JButton elipse=new JButton("Elipse");
           JButton rectangle=new JButton("Rectangle");
           JButton line=new JButton("Line");
           String selected;
           public test_bmp()
                   color = Color.black;
                   setBorder(BorderFactory.createLineBorder(Color.black));
           public void paintComponent(Graphics g)
                   //super.paintComponent(g);
                   g.drawImage(image, 0, 0, this);
                   Graphics2D g2 = (Graphics2D)g;
                   g2.setPaint(Color.black);
           if(selected=="elipse")
                   g2.drawOval(start.x, start.y, (end.x-start.x),(end.y-start.y));
                   System.out.println("paintComponent() "+start.getX()+","+start.getY()+","+(end.getX()-start.getX())+","+(end.getY()-start.getY()));
                   System.out.println("Start : "+start.x+","+start.y);
                   System.out.println("End   : "+end.x+","+end.y);
           if(selected=="line")
                   g2.drawLine(start.x,start.y,end.x,end.y);
           //Draw on Buffered image
           public void draw()
           Graphics2D g2 = image.createGraphics();
           g2.setPaint(color);
                   System.out.println("draw");
           if(selected=="line")
                   g2.drawLine(start.x, start.y, end.x, end.y);
           if(selected=="elipse")
                   g2.drawOval(start.x, start.y, (end.x-start.x),(end.y-start.y));
                   System.out.println("draw() "+start.getX()+","+start.getY()+","+(end.getX()-start.getX())+","+(end.getY()-start.getY()));
                   System.out.println("Start : "+start.x+","+start.y);
                   System.out.println("End   : "+end.x+","+end.y);
           repaint();
           g2.dispose();
           public JPanel addButtons()
                   JPanel buttonpanel=new JPanel();
                   buttonpanel.setBackground(color.lightGray);
                   buttonpanel.setLayout(new BoxLayout(buttonpanel,BoxLayout.Y_AXIS));
                   elipse.addActionListener(this);
                   rectangle.addActionListener(this);
                   line.addActionListener(this);
                   buttonpanel.add(elipse);
                   buttonpanel.add(Box.createRigidArea(new Dimension(15,15)));
                   buttonpanel.add(rectangle);
                   buttonpanel.add(Box.createRigidArea(new Dimension(15,15)));
                   buttonpanel.add(line);
                   return buttonpanel;
           public static void main(String args[])
                    test_bmp application=new test_bmp();
                    //Main window
                    JFrame frame=new JFrame("Whiteboard");
                    frame.setLayout(new BorderLayout());
                    frame.add(application.addButtons(),BorderLayout.WEST);
                    frame.add(application);
                    application.addMouseListener(application);
                    application.addMouseMotionListener(application);
                    //size of the window
                    frame.setSize(600,400);
                    frame.setLocation(0,0);
                    frame.setVisible(true);
                    int w = frame.getWidth();
                int h = frame.getHeight();
                image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                g2.setPaint(Color.white);
                g2.fillRect(0,0,w,h);
                g2.dispose();
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           @Override
           public void mouseClicked(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void mouseEntered(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void mouseExited(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void mousePressed(MouseEvent event)
                   start = event.getPoint();
           @Override
           public void mouseReleased(MouseEvent event)
                   end = event.getPoint();
                   draw();
           @Override
           public void mouseDragged(MouseEvent e)
                   end=e.getPoint();
                   repaint();
           @Override
           public void mouseMoved(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void actionPerformed(ActionEvent e)
                   if(e.getSource()==elipse)
                           selected="elipse";
                   if(e.getSource()==line)
                           selected="line";
                   draw();
    }

  • Need help in simple function

    Hi,
    i am using sql developer to write a simple function .which need to get job details by using employ number
    ..below is the function
    CREATE OR REPLACE
    FUNCTION Q_JOB(empno1 in emp.empno%type) RETURN VARCHAR2 AS
    job1 varchar2(100);
    BEGIN
    select job into job1 from
    emp where empno=empno1;
    dbms_output.put_line('job :'||job1);
    RETURN job1;
    END Q_JOB;
    when i am trying to run this using command
    execute q_job(7369);
    i am getting folowing error..
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    can any one tell whats exact problem is?

    You can use execute only for procedures, not functions.
    You have different possibilities:
    * If you like issuing the statement from a worksheet, use an anonymous block:
    DECLARE
      v_job  emp.job%type;
    BEGIN
      v_job = q_job(7369);
    END;
    / * Alternatively, use your function in SQL:
    SELECT q_job(7369) FROM DUAL; * For editing and testing your PL/SQL code, sqldev has very cool features: editor, compiler and debugger.
    Under the Functions node under your connection, you'll find your function: right-click and Edit it. Just above your code you have a mini-toolbar to Compile your code, Run or Debug it. A lot more on this inside the Help topics.
    Using the last 2 possibilities will provide you the returned value, so using dbms_output in your function isn't even necessary.
    Have fun,
    K.

  • Basic help with Flash v10 (creating a simple calculator)

    I have Adobe CS4 Pro with Flash v10.  I'm trying to create a simple, basic calculator that adds 2 numbers.  I followed the tutorial at http://layersmagazine.com/flash-design-calculator.html.  At first, I was unable to assign variables to any objects, but got that cleared up by selecting ActionScript 2.0 (was set to 3.0).  At this point, the calculator accepts the two numbers, but when I select the "add" button with the associated code as shown in the tutorial, nothing happens.  Does anyone have a suggestion as to what I might be doing wrong?  Thanks.

    This is all the code there is:
    on(release) {
    total = Number(firstnumber)+Number(secondnumber);
    There's really not an error--I just don't get any output.  I've created two 'Input Text' boxes, and on the properties tab for each I have defined the "Variable:" field as either 'Number(firstnumber)' or 'Number(secondnumber)'.  I've also created a 'Dynamic Text' box and defined the "Variable:" field as 'Number(total)'.
    Note:  the example I was following did not specify to include the 'Number()' function in the "Variable:" fields.  However, when I don't, and I run 'Test Movie', the 3 boxes are automatically filled with "_level0.firstnumber", "_level0.secondnumber" and "_level0.total".  When I type 2 numbers in to the 2 'Input Text' boxes, and then select my button that has the above code associated with it, I get "NaN" in the output ('Dynamic Text') box.
    Thanks again for your help!

  • Need help to call a simple function from within another function?

    I created a movieclip which has a function in its one and only frame.
    function testx() {
    x = x+2};
    This movieclip is in the main timeline (in its own layer).
    In another layer on the timeline I have created a single keyframe with a button instance called myBtn
    myBtn.onRelease = function() {
    var x
    x =2
    testx(2);
    trace (x);
    What I want to do is call the function in the movieclip frame from the button press function. However, I can't seem to reference it properly.
    Can anyone help me to basically call a simple function from within another function?

    Yes am using CS4.  Have saved it as CS3 now.  Ok the file is somewhat complicated and what I am testing is not what I ultimately want to do but if I can pass that variable I can figure it out.  In terms of describing the file I think the only parts of importance are what I put in my previous post (please let me know if there is something I should be telling you that I have missed).  I am 99.9% sure that I am using the correct instance name.
    Scene1 Layer3 Frame1 has the function call for the button.
    myBtn.onRelease = function() {
    var x
    x = 2
    testx(2);
    trace (x);
    Slideshow layer //Actions Frame1 has the function
    function testx(x) {
    x = x+2};
    thank you so much for helping me.

  • Help With Simple Function

    I was wondering if someone could help me out with a simple function I'm trying to create. I'm kind of new to functions in oracle and I don't know the exact syntax or what it expects from me. I would appreciate it if someone could look at this and point out what I'm doing wrong.
    CREATE OR REPLACE FUNCTION freshman_status_term(
    pidm IN varchar2
    RETURN varchar2 IS term
    BEGIN
    SELECT sgbstdn_term_code_eff INTO term
    FROM sgbstdn
    WHERE sgbstdn_pidm = pidm
    AND sgbstdn_styp_code = 'F'
    AND sgbstdn_stst_code = 'AS'
    RETURN term;
    END freshman_status_term;
    The goal of the function is to find out the term for when a student is listed as a freshman. I keep getting errors though, so something must be wrong with it. Any help is appreciated. Thanks.

    Sven W. wrote:
    >
    My code looked exactly like that minus the exception part when I got the error before.Please post the code that you used and the full error message that you got.CREATE OR REPLACE FUNCTION freshman_status_term(
    pidm IN varchar2
    RETURN varchar2
    IS
    term sgbstdn.sgbstdn_term_code_eff%TYPE;
    BEGIN
    SELECT sgbstdn_term_code_eff INTO term
    FROM sgbstdn
    WHERE sgbstdn_pidm = pidm
    AND sgbstdn_styp_code = 'F'
    AND sgbstdn_stst_code = 'AS'
    RETURN term;
    END freshman_status_term;
    SELECT freshman_status_term ('216520') FROM dual;
    Error: PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + ; case mod new not null <an identifier>
    The error is highlighted right after the BEGIN statement
    Edited by: user10548103 on Nov 6, 2008 8:53 AM

  • Unable to create a simple test client. Got ConfigException: JBO--33001

    I am trying to create a simple test client as per ADF training manual. Have just created an empty AM. The test client is giving this error at runtime.
    The test client looks like:
    public static void main(String args[])
    String amDef = "test.TestModule";
    String config = "TestModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    // Work with your appmodule and view object here
    Configuration.releaseRootApplicationModule(am, true);
    Getting the following error
    Exception in thread "main" oracle.jbo.ConfigException: JBO-33001: Cannot find the configuration file /test/common/bc4j.xcfg in the classpath
         at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:432)
         at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:284)
         at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:539)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1252)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1230)
         at amit.bc4j.TestClient.main(TestClient.java:18)
    Process exited with exit code 1.
    I have added JAXB and Applications Core libraries to the default library list.
    (added JaxB because of http://myforums.oracle.com/jive3/thread.jspa?messageID=3425268&#3425268
    and Unable to create a simple test client. Error JAXBException
    I have checked that /home/aagupta/jdevhome/home/aagupta/jdevhome/FusionJdev/mywork/Test2/TestProj/classes/amit/bc4j/common/bc4j.xcfg file exists.
    I even tried to add this directory using Add lib/directory pane, but no help.
    Please suggest what to do...
    Thanks,
    Amit

    Got it....i paid the price of not understanding the error messages and expecting bc4jclient and ctrl+enter is a magic wand :)
    Thanks to Steinmeier,Oliver http://myforums.oracle.com/jive3/thread.jspa?messageID=3408700&#3408700
    The shortcut only generates sample code. We need to substitute the actual AM location.
    public static void main(String args[])
    String amDef = "amit.bc4j.model.TestAM";
    String config = "TestAMLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    System.out.println("Read the messages!");
    // Work with your appmodule and view object here
    Configuration.releaseRootApplicationModule(am, true);
    }

Maybe you are looking for

  • One account with two folders on the hard drive

    Sorry but i think this is a very basic question. I have one user (the administrator), but on the hard drive there are two folders. One named Peter and the other named Dad. I have all of my files in the folder named Peter. I seem to be logged in to th

  • Help, iTunes store wont open, Error (11333)

    it won't go to iTunes store, it opens up the library but when I click iTunes store it says "iTunes could not connect tp the iTunes store. An unknown error occured (11333), help me because i just purchase a $50 iTune card and i want to buy music, than

  • How to get the previous data?

    Hi, I am monitoring a one moving point with coordinates (Xd,Yd). I want to get the two previous data so that I can calculate the point of origin as (Xo,Yo). I made a calculation that if i have three known points I will be able to get the point of ori

  • JTree node incorrectly becomes a leaf after collapse?

    Hi all, I'm trying to fix a bug in a JTree where a node spuriously turns into a leaf after the user collapses it, and I'm beginning to wonder whether it's my code that's at fault or something within Java (The project uses JDK 1.3.1.06 - I cannot chan

  • Anyone know when in November the iPhone 4s will come out?

    Its pretty stupid I can't get the unlocked one until later with such a premium price tag.  I love Apple I just hate how secretive they are.  I want to know if its worth keeping the iphone 4 I just bought a week ago before they announced the 4s or ret