Help Needed in Building JTree

HI,
I've a doubt in Building a JTree.It wud be helpful if some one helps me with a better logic for building this Tree..
I have a tree like this:
root
|
A--B--C--D
A--B--C--D
A--B--C
A--B--C--E--F
I have the tree nodes like this . i need to merge the nodes like this
root
|
A
|
-- B
|
--C
|
--D
--E
|
--F
I've tried it in few ways. It doesn't seems to be working.. Can some one help me in giving me a better logic in doing this

Hello,
When updating the tree, do not access the tree nodes directly. Update the tree via its (TreeModel).
to get the model of your JTree use
DefaultTreeModel treeModel = (DefaultTreeModel)myTree.getModel();to add nodes use the method
treeModel.insertNodeInto(newChild,parent,offset);and remove nodes using
treeModel.removeFromParent(nodeToRemove);--
Regards,
Ahmed Saad

Similar Messages

  • Help needed to build delete statement

    i need to keep last 10 days data+ last day of everymonth data in my table.
    this table will grow on daily basis.
    ex:
    data_date no.of records
    2006/02/28 10000
    2006/03/31 11000
    2006/04/30 12000
    2006/05/31 13000
    2006/06/09     13100
    2006/06/10 13200
    2006/06/11 13300
    2006/06/12 13400
    2006/06/13     13500
    2006/06/14     13600
    2006/06/15 13700
    2006/06/16 13800
    2006/06/17     13900
    2006/06/18     14000
    means last 10 days + last day of evermonth data need to store and remaining all
    records i need to delete from this table.
    could you help me to build this delete statement in single statement.

    select * from mytbl;
    DD                 NR
    28-02-2006      12000
    31-03-2006      10000
    30-04-2006      12050
    31-05-2006       9500
    06-06-2006      13100
    07-06-2006      13200
    08-06-2006      13300
    09-06-2006      13400
    10-06-2006      13500
    11-06-2006      13600
    12-06-2006      13700
    13-06-2006      13800
    14-06-2006      13900
    15-06-2006      14000
    16-06-2006      14100
    17-06-2006      14200
    18-06-2006      14300
    17 rows selected.
    delete from mytbl
    where not
    ( dd = last_day( dd ) -- Keep last days of months
       or  dd >= trunc(sysdate) - 10 -- Keep last 10 days
    3 rows deleted.
    select * from mytbl;
    DD                 NR
    28-02-2006      12000
    31-03-2006      10000
    30-04-2006      12050
    31-05-2006       9500
    09-06-2006      13400
    10-06-2006      13500
    11-06-2006      13600
    12-06-2006      13700
    13-06-2006      13800
    14-06-2006      13900
    15-06-2006      14000
    16-06-2006      14100
    17-06-2006      14200
    18-06-2006      14300To me...it looks like it does work!

  • Help needed in building query

    Tab1
    Parent       Child       sa l
    P1     A1       4000
    A1     A       1000
    A1     B       4000
    A     X       1000
    A     Y         2000
    B     X1        1000           
    B     X2       3000I need to build a query that will retrieve the value for each child as the sum of the salaries of all its child in a single query.
    That is
    For Sal P1 = Sal A1 + all child of A1 and its child
         For A1 = Sal A1 + all child of A1 and its child ( A+B+X+Y+X1+X2)
    Like it should sho all the records with the count .. please help

    This is not so simple since it is not really clear in your data set whether the sal belongs to the parent or to the child. I assume it's the salary of the child, in which case the salary of P1 is missing. The best option is to fix the data model and have two tables: one containing the element and sal, and another table containing just the relationships. To fix this issue I introduced a dummy record for P1 and salary 0.
    SQL> with t2 as
      2  ( select connect_by_root(child) cbr
      3         , sal
      4      from (select * from t union all select null,'P1',0 from dual)
      5   connect by parent = prior child
      6  )
      7  select cbr child
      8       , sum(sal)
      9    from t2
    10   group by cbr
    11  /
    CHILD    SUM(SAL)
    X1           1000
    A1          16000
    X2           3000
    P1          16000
    Y            2000
    X            1000
    A            4000
    B            8000
    8 rows selected.Regards,
    Rob.

  • Help needed to build simple BRF

    Hi,
    I am new to BRF and wanted some help from you building a simple BRF, say a look up from the database table.

    Hi,
    I guess you are trying to use BRF function from custom application and not talking about Process-Controlled Workflow.
    Yes. You can use BRF from custom application. BRF is just one of functions delivered in NetWeaver level.
    http://help.sap.com/saphelp_scm70/helpdata/EN/9a/6b67ce7c26446483af079719edf679/frameset.htm
    http://help.sap.com/saphelp_scm70/helpdata/EN/d6/38bb4006d9cc38e10000000a155106/frameset.htm
    Regards,
    Masa

  • Help needed in building a tree without duplicatin​g the nodes

    Iam trying to construct a tree, ID name as the parent node and channel name & channel values as its corresponding child nodes.
    I had constructed the tree, but the problem i have is with interfacing that with in my  main program. In the main program say suppose I have 5 Id's, each Id has some X number of channel's. And each channel has a value.
    Each Id is indexed and passed to the for loop. And since this for loop is inside the while loop each ID will be executed for every 5 iterations.
    Id, channel names will be constant each time it gets executed, but the channel value's will be updated during run time.
    If I directly feed the Id, channel names and values, replacing the constants in the vi, the tree is duplicating the messages, each time a ID is received inside the for loop, it is creating a new parent and child nodes.
    Please help me in fixing this issue, and constructing the tree, where the ID and channel names are not not duplicated.For better understanding Iam attaching a snapshot shot, which tells at what point the ID, channel name array and value is received.
    Attachments:
    channel_info.vi ‏31 KB
    channel.png ‏60 KB

    Caleb Harris, the arbitration ID is not the same each time. Cluster has several different id's, this can be seen in the attached screen shot. Attached sreen shot shows the cluster information,  a sample ID unbundled from the array and the list of channels in that Arbitration ID. I got an idea how to construct the tree but for that,
    1)Need to store all this arbitartion Id's,channel's , and values in 3- different arrays (Channel array and the values array must have the same size).
    2)Channel array must be in synchronus with the Value array say like the first index value of the value_array  should represent the value of the first element of the channel    
       array, similarly the second index value of the value_array  should represent the value of the second element of the channel array and so on.
    3) When ever the channel value gets updated, that particular element of the value array should be updated.
    If I can do this 3- steps I think I can succesfully build a tree. Can you please take a look at the snapshot and help me out in doing this.
    Attachments:
    Cluster Image.PNG ‏67 KB

  • Urgent help needed in building an expression

    hi,
    I am using expression editor to build the following simple expression.
    "if inputvalue = 0 then 10 else 20"
    so Far I have used various forms of "IF" and "CASE" statements but could not successfully create the expression.Could not find anything useful in the help docs as well.
    any help asap would be highly appreciated..highly disappointed with OWB which does not allow to build such a simple expression and the user docs as well are very poor.

    Hi,
    There is something you need to know up front on expressions and transformations. Expressions are SQL expressions, whereas transformations are pl/sql.
    Looking at your pseudo code, you are trying to do a procedural thing. So there are 2 ways of doing this. One is correctly the case statement. For an example on how to do this go to the OWB sample code page on OTN (http://otn.oracle.com/sample_code/products/warehouse/content.html) where an explanation is given on how to do this. It includes an example metadata file for you to evaluate.
    The other way of doing this is in PL/SQL, in which case you would create a small function accepting in parameter and then doing the procedural language on that. To create this use the create functions activity in OWB. Here you will get a nice code editor (similar to the expression builder) to guide you in the creation of this function.
    Hope this helps,
    Jean-Pierre

  • Help needed redrawing a JTree

    Hi,
    I'm writing a simple Swing program to examine the entries in a JAR file as a JTree. It is not meant to be professional grade, it's simply for my own fun.
    I have the program so that it displays a Window with a Menus. When the user chooses a JAR file, the program opens the JAR file, reads the entries in the file, and builds a DefaultTreeModel for the entries in the JAR file. Then, it builds a JTree from the DefaultTreeModel.
    The program works great, except, once the tree is created, I don't know how to force Swing to redraw the JFrame.
    Can someone please tell me what I'm doing wrong?
    The code is as follows:
    <pre>
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.io.*;
    import java.util.jar.*;
    import java.util.*;
    * <p>This class is used to display the contents of a JAR file.
    * The entries of the JAR file will be displayed in Swing Tree.
    * @version 1.0
    * @author Kevin Yetman
    public class JarFileTree
    * <p>This method is used to display the GUI.
    public static void main(String[] args)
    {  JFrame frame=new JarTreeFrame();
    frame.show();
    * <p>This class is used to define the javax.swing.JFrame based object that
    * will contain the tree from the JAR file.
    class JarTreeFrame extends JFrame implements ActionListener
    private JTree tree;
    private DefaultTreeModel treeModel;
    private DefaultMutableTreeNode root;
    private JScrollPane scrollPane;
    * <P>This constructor is used create and display the frame.
    public JarTreeFrame()
    {  setTitle("JAR Viewer");
    setSize(800, 600);
    addWindowListener(new WindowAdapter()
    {  public void windowClosing(WindowEvent e)
    {  System.exit(0);
    JMenuBar menuBar=setupMenuBar();
    setJMenuBar(menuBar);
    root = new DefaultMutableTreeNode("No file selected yet.");
    treeModel=new DefaultTreeModel(root);
    tree = new JTree(treeModel);
    scrollPane=new JScrollPane(tree);
    Container contentPane=getContentPane();
    contentPane.add(scrollPane);
    public void processString(String currentEntry, DefaultMutableTreeNode currentNode, DefaultTreeModel treeModel)
    if( currentEntry.length()==0 )
    {  return;
    int slashPos=currentEntry.indexOf('/');
    String currentToken="";
    String remainingPartOfCurrentEntry="";
    if( slashPos!=-1 )
    {  currentToken=currentEntry.substring(0, slashPos);
    remainingPartOfCurrentEntry=currentEntry.substring(slashPos+1, currentEntry.length());
    else
    {  currentToken=currentEntry;
    boolean childFound=false;
    for(Enumeration e=currentNode.children(); e.hasMoreElements(); )
    DefaultMutableTreeNode currentChild=(DefaultMutableTreeNode)e.nextElement();
    if( currentChild.toString().equals(currentToken) )
    processString(remainingPartOfCurrentEntry, currentChild, treeModel);
    childFound=true;
    if( !childFound )
    DefaultMutableTreeNode newChild=new DefaultMutableTreeNode(currentToken);
    treeModel.insertNodeInto(newChild, currentNode, currentNode.getChildCount());
    protected JMenuBar setupMenuBar()
    JMenuBar menuBar=new JMenuBar();
    JMenu helpMenu =new JMenu("Help");
    JMenuItem aboutItem=new JMenuItem("About");
    aboutItem.setActionCommand("HelpAbout");
    aboutItem.addActionListener(this);
    helpMenu.add(aboutItem);
    JMenu fileMenu = new JMenu("File");
    JMenuItem openItem=new JMenuItem("Open");
    openItem.setActionCommand("FileOpen");
    openItem.addActionListener(this);
    JMenuItem exitItem=new JMenuItem("Exit");
    exitItem.addActionListener( new ActionListener()
    {  public void actionPerformed(ActionEvent evt)
    { System.exit(0);
    fileMenu.add(openItem);
    fileMenu.add(exitItem);
    menuBar.add(fileMenu);
    menuBar.add(helpMenu);
    return menuBar;
    public void setupTree(String fileName)
    try
    JarFile jarFile=new JarFile(new File(fileName));
    for(Enumeration e=jarFile.entries(); e.hasMoreElements(); )
    String currentEntry=(e.nextElement().toString()).trim();
    processString(currentEntry, root, treeModel);
    DefaultMutableTreeNode lastLeaf=root.getLastLeaf();
    TreePath path=new TreePath(treeModel.getPathToRoot(lastLeaf));
    tree.makeVisible(path);
    catch(IOException e)
    {  JOptionPane.showMessageDialog(this, "ERROR: " + e.toString());
    public void actionPerformed(ActionEvent evt)
    if(evt.getActionCommand().equals("FileOpen"))
    FileOpenSaveAs fosa=new FileOpenSaveAs(this, true);
    if(fosa.approveOptionClicked())
    String fileName=fosa.getSelectedFile();
    fileName+=".jar";
    setupTree(fileName);
    Container contentPane=getContentPane();
    contentPane.removeAll();
    contentPane.add(new JScrollPane(tree));
    contentPane.repaint();
    if(evt.getActionCommand().equals("HelpAbout"))
    {  JOptionPane.showMessageDialog(this, "JAR Viewer Version 1.0\nKevin Yetman");
    // FileOpenSaveAs.java
    // Author: Kevin Yetman
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    // this class handles the display of the
    // File Open or File Save As box.
    public class FileOpenSaveAs {
    // the constructor takes one argument, a
    // boolean which if true opens the File Open
    // box. If false it opens the save as box.
    public FileOpenSaveAs(JFrame baseWindow, boolean fileOpenBox) {
    // initailze the result varialbe
    result=-1;
    // store the value of the fileOpenBox.
    openBox=fileOpenBox;
    // initialize the fileNameSelected string.
    fileNameSelected=new String();
    // first build a JFileChooser.
    JFileChooser fc=new JFileChooser();
    // next tell the file chooser to look in the
    // current directory.
    fc.setCurrentDirectory(new File(CURRENT_DIRECTORY));
    // if the file open box is true, display the file open box.
    // otherwise, display the file save as box.
    if( fileOpenBox ) {
    fc.setDialogTitle(OPEN_TITLE);
    displayBox(baseWindow, fc);
    else {
    fc.setDialogTitle(SAVE_AS_TITLE);
    displayBox(baseWindow, fc);
    // the constructor takes one argument, a
    // boolean which if true opens the File Open
    // box. If false it opens the save as box.
    public FileOpenSaveAs(JDialog baseWindow, boolean fileOpenBox) {
    // initailze the result varialbe
    result=-1;
    // store the value of the fileOpenBox.
    openBox=fileOpenBox;
    // initialize the fileNameSelected string.
    fileNameSelected=new String();
    // first build a JFileChooser.
    JFileChooser fc=new JFileChooser();
    // next tell the file chooser to look in the
    // current directory.
    fc.setCurrentDirectory(new File(CURRENT_DIRECTORY));
    // if the file open box is true, display the file open box.
    // otherwise, display the file save as box.
    if( fileOpenBox ) {
    fc.setDialogTitle(OPEN_TITLE);
    displayBox(baseWindow, fc);
    else {
    fc.setDialogTitle(SAVE_AS_TITLE);
    displayBox(baseWindow, fc);
    // this method displays the File Open box on the base window.
    public void displayBox(JFrame baseWindow, JFileChooser fc) {
    // display the file open box and get the result.
    result=-1;
    if( openBox==true ) {
    result=fc.showOpenDialog(baseWindow);
    else {
    result=fc.showSaveDialog(baseWindow);
    // get the file name.
    if( approveOptionClicked() ) {
    fileNameSelected=fc.getName(fc.getSelectedFile());
    else {
    fileNameSelected="";
    // this method displays the File Open box on the base window.
    public void displayBox(JDialog baseWindow, JFileChooser fc) {
    // display the file open box and get the result.
    result=-1;
    if( openBox==true ) {
    result=fc.showOpenDialog(baseWindow);
    else {
    result=fc.showSaveDialog(baseWindow);
    // get the file name.
    if( approveOptionClicked() ) {
    fileNameSelected=fc.getName(fc.getSelectedFile());
    else {
    fileNameSelected="";
    // check to see if the result is APPROVE_OPTION. If so, we
    // will return true.
    public boolean approveOptionClicked() {
    return (result == JFileChooser.APPROVE_OPTION );
    // get the file name chosen by the user.
    public String getSelectedFile() {
    return fileNameSelected;
    // private attributes for this class.
    private boolean openBox;
    private static final String CURRENT_DIRECTORY=".";
    private static final String SAVE_AS_TITLE="Save As";
    private static final String OPEN_TITLE="Open";
    private int result;
    private String fileNameSelected;
    </pre>
    Thanks!
    Kevin Yetman

    Without looking at all your code, I would suggest that you only redraw the part of the tree that changes (addition or deletion of nodes). To do this, you can call a method of DefaultTreeModel, nodeStructureChanged(TreeNode nodeThatChanged). This fires the appropriate event which in turn causes the node and only its descendents to be redrawn. Good luck.
    -Matt

  • Help needed for building report with execution method Java Concurrent prog

    Hi,
    I have saw a report like this:
    The report has executable "XML Publisher Data Template Executable", short name as "XDODTEXE", application "XML Publisher",execution method "Java Concurrent program". Also the report has a XML publisher Data Template and Data definition and in the data definition a .xml file is attached.
    I could not understand what is the data source?
    Could anyone help me on how to build or update this type of report?
    Is there any link or help docs which has proper step by step procedure to build this type of xml publisher report?
    Please help.
    Thanks.

    The xml file which is attached to the data definition is the data source and it has sql queries and structure of xml file.
    Check this out for step-by-step guidance.
    http://www.oracle.com/technetwork/middleware/bi-publisher/overview/xmlebsrep-132947.pdf
    http://apps2fusion.com/at/ps/51-prabhakar/262-xml-publisher-and-data-template-sql-query-to-develop-bi-publisher-reports
    For more on data templates refer user guide
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e12187/T421739T434255.htm

  • Help needed in building a  sql query

    Hello,
    I am using Oracle 10g db.
    I have 3 tables table1 and table2 and table3
    I am writing one sql query which is like
    select table1.a a1,(select distinct b from table2,table3 where table2.id=table3.id and table1.id=table2.id) b1
    from table1
    Now the b1 value may give more then 1 values so when i am trying to execute the query its giving me error.
    What i would like to have is if it gives returns more then 1 value then add that value as a new column means if b1 gives like abc and def as values.
    Then i want the sql to return like
    acolvalue abc def as a single row.
    Is this possible to do?
    Thanks

    Hello,
    The approach which i took is i wrote a function which gives me the b values , sseparated.
    Then i am building a outer query considering the max of b so i just found there are max 10 values which one row is showing.
    select b11,b12,b13,,,b10
    from (
    select table1.a a1,func(select distinct b from table2,table3 where table2.id=table3.id and table1.id=table2.id) b1
    from table1)
    but now i am facing problem like the value of b1 is a,b,c
    i want to use the substr and instr function to get
    a as b11
    b as b12
    c as b13
    can anyone pls help me out to write a query? i am getting b11 but other values are somehow not coming.
    for b11
    i used
    substr(b1,1,instr(b1,',',1,1)-1)
    Thanks

  • Help needed in building a demo mobile app for DRM support using Content server 4

    Hi all,
    I am building an application for the blackberry to support reading of pdf and ebuf content similar to Adobe Digital Editions with DRM support . I came to know about the Adobe RMSDK .
    Following is my understanding regarding my implementation , please correct me if i am wrong:
    The DRM implementation on a mobile device for Adobe should satisfy the following criteria:
    1. The mobile device should have a application which uses the Adobe RMSDK.
    2. The publisher or the server app should install and run the content server 4
    3. An acsm file which contains the rights data should be saved stored at the adobe server and should be downloaded by the mobile client.
    4. The urls in the acsm xml file will be used to fetch the content for the ebook.
    I have the following querries:
    1. Is there an implementation of the RMSDK for java to run on blackberry.
    2. Is Adobe content server 4 free to install, if not do we have a test server for this purpose.
    Thanks in advance for the help.

    Hi Jim,
    Thanks for your kind reply. I have some more querries
    Suppose if we have a client implementation of the Adove RMSDK in java,  please help answer these querries:
    1. How do we connect to the cs4 server (what will be the flow of data, is there a documentaion regarding the protocol to be used between the mobile client and the cs4 server in order to communicate and fetch Rights protected ebuf and pdf data.
    2. The link http://www.adobe.com/products/digitaleditions/library does not give me information of how to use this library to store by ebook data and fetch  drm data from the mobile client and the protocol/communication followed.
    3. How do i go forward in evaluating acs4( getting a test version of cs4 and using it ). We want to build a demo app in blackberry.
    thanks
    Amit

  • Help needed with building Flex App without FlexBuilder

    Hi Guys,
    I was building my application on Struts framework with JSPs
    as the front end. I just got a new requirement to try and build my
    application's GUI with Flex (completely replacing JSPs). I cannot
    use FlexBuilder as my company won't buy it. I've been trying to dig
    through all articles and documentation to find out how to write
    MXML files and compile them without a FlexBuilder. I have learnt
    that I can write MXML files using plain notepad, but I am totally
    lost when it comes to understanding how to compile my MXML files
    with FlexBuilder. I know about the ant compiler and web compiler
    but How do I use them? I want to use the web compiler but how can I
    configure the Web Compiler to compile my MXML files when I run my
    app? Can someone kindly help me out.
    Thank You,
    TNJ

    You can use mxmlc to compile your mxml files into swfs.
    Google for mxmlc and there should be plenty information.

  • HELP NEEDED ON BUILDING HTMLDB APP

    Hello,
    I am very new to HTMLDB and building an application. I have the HTML already developed using Macromedia and I have some styles and Javascripts, I would like to use this piece of HTML and HTMLDB's functionality,
    The first thing I wanna do is I want to create a login for users of my site, I have many questions here, would appreciate if someone can answer me,
    1. I would prefer using the login process from the sample application, but at the same time, my application would require concepts like users mapped to groups, that I create and only people in certain groups should be able to see certain pages or links, is it better to use HTMLDB's admin or should I create a custom process? would appreciate if someone can point me on a doc or help to implement the login process with custom html page.
    2. Where will I input all my CSS, UI images, and what would the src to the files be in html if I upload the same using HTMLDB, I know its done some where but not able to figure out,
    3. Would really be great, if someone can first get me started with rendering an HTML page with above criterias and it would be awsome if I can have a login page working. Thanks

    Hello,
    Take a look at the howtos section
    http://www.oracle.com/technology/products/database/application_express/howtos/index.html
    or the studio
    http://htmldb.oracle.com/pls/otn/f?p=18326:1
    or the wiki
    http://wiki.shellprompt.net/bin/view/Apex/
    or the Oracle By Example
    http://www.oracle.com/technology/obe/obe10gdb/develop/htmldb/htmldb.htm
    There's quite a bit of info out there that should help get you going in the right direction.
    For your second question it how you link in your files depends if you have access to the filesystem or not. If you have access to the filesystem it's usally somethign like #IMAGE_PREFIX#, if you've uploaded through the UI it's either #WORKSPACE_IMAGES# or #APP_IMAGES# followed by the image name.
    Carl

  • Good morning, AS3 help needed for building my own site in flash

    Good morning to all,
    I am creating a site in Flash, I am using AS3 to create a
    site that stops/starts the movie on my home page and I have a
    series of buttons that play a head (or are supposed to) to the a
    frame for each additional page. Do I need A.S. for each button as
    well? I didn't think I did. The script below is the first one in
    the layer titled actions, this I thought is supposed to stop/start
    the movie at the beginning and the button abt_mgn_btn is supposed
    to bring it to frame 10 to play my about page. ?? at my frame
    number 10 should I put the stop(); script there as well? And at
    every frame break for the next pages? I am hopelessly in need of
    guidance. Thank you to anyone helping me out.
    import flash.events.EventDispatcher;
    import flash.display.MovieClip;
    this.stop();
    function startMovie(event:MouseEvent):void {
    this.gotoAndPlay(10);
    abt_mgn_btn.addEventListener(MouseEvent.click,startMovie);

    If you have a button on the same timeline as your code with
    the instance name of abt_mgn_btn, then, when this button is
    released, the playback head will jump to frame 10 of the current
    timeline and continue to play.
    If you want the playback head to jump to that frame and stop
    then, either use gotoAndStop(10), or put a stop(); command at frame
    10. GotoAndStop() will work more reliably.
    Have you gone through the tutorials that come with Flash?
    These tutorials may help you to understand the basics of working in
    Flash CS3. You may also benefit from a book or two on Flash. Try
    "Foundation Flash CS3 for Designers" by Tom Green and David Stiller
    from friends of Ed, ISBN 159059861X and/or "Adobe Flash CS3
    Professional, Classroom in a Book" from Adobe Press, ISBN
    0321499824.

  • Help needed in building a function

    Hello,
    I am using Oracle DB 11g.
    I am writing a function.
    create or replace function func(tab VARCHAR2) RETURN VARCHAR2 AS
    cursor c is SELECT column_name
    FROM all_tab_columns
    WHERE table_name =tab;
    begin
    //some statements
    for i in c loop
    flag=1;
    //some statements
    end loop;
    //use the same c cursor query
    if flag!=1 then
    //repeat the block inside the for loop;
    end if;
    end;
    Function works fine.
    Now once the for loop ends,what i want is if it doesn't enter the for loop, then for just for once enter the if condition for
    any column from the table and repeat the process, which i am doing inside the for loop.
    But here i am finding repetition of same query and the block of code.
    Is there any way i can avoid that?
    Thanks

    How about you start from scratch and explain the business problem you are attempting to solve. Not a portion of a technical implementation that doesn't seem to make any sense.
    Start from the beginning, no code ... just "i have a situation where i need to .... ".
    Should be a lot more productive.

  • Urgent help needed to build a script for like mapping

    ll
    Edited by: Tom&amp;amp;amp;Mah on Jul 17, 2012 7:13 AM

    Hello,
    I don't have a VI for you, but I'll try to give you some ideas.
    Of course, first you will need to use DAQ VIs to acquire the data. You will probably have a loop with one scan process per loop iteration. In that case, just put a chart inside the loop and the new data will be added to the chart. The data will be plotted starting at the last scanned x-axis point, and the plot line will continue from the previous y point. If the new scan doesn't start until the user presses a button on the front panel, then you should use event driven programming. I have included a simple example that will plot new data after the user hits a Boolean. The new data is added to the chart.
    You might want to search on google for LabVIEW and xps to see if someone else ha
    s implemented some VI to use with xps.
    Zvezdana S.
    Attachments:
    Chart.vi ‏28 KB

Maybe you are looking for

  • Safari will not open web pages anymore on my MacBook.

    I am running Mac OSX 10.7.5 Lion, Safari 6.0.2.  Although I have had occasional problems with slow loading web pages in the past,  it wasn't until yesterday that pages stopped loading entirely. I am using my iPad to post this question. The iPad, my i

  • How to determine total clicks in a EOS 5D

    How do you determine total clicks in a EOS 5D ??

  • Rfc call from html page

    i wrote html code for entering username and password. then i got output in html page as SAP LOGON SCREEN USER NAME PASSWORD            ENTER when the user press enter button both username and password has to check with data in ztable in sap. validati

  • How can i change a video to a button in INDD? interactive PDF export issue

    in iNDD, I wish to have 2 videos on a page, overlayed, with two buttons that when each is clicked it shows the respective video and hides the other one, i have it working in epub3 using the interactive functionality, but in interactive PDF export, on

  • Add Material No. and Serial No. to Component of IBase and also add warranty

    Hi Gurus, Can any of you tell me how to add a "Material No." and "Serial No." to the component of an IBase and also add warranty to this component. It is manually done through IB52 by changing the values on-screen for the components attached to the I