Using the procedure to display the table of multiple data

Hi, I need help for the procedure in oracle

I want to create the procedure to display the table of multiples with sample plan

with a parameter imployee_id to display an employee_id, name, function, start_date, end_date

IAM using this query to select more than one table

SELECT e.employee_id, e.first_name, j.job_title, h.start_date, h.end_date

E EMPLOYEES

JOIN j jobs

ON j.job_id = e.job_id

JOIN the job_history:

ON h.employee_id = e.employee_id

WHERE e.employee_id = 200;

Thanks for the help

Blu and Billy showed you the 'real' solution. You can display the data returned by a cursor ref in SQL Developer, too:

http://www.thatjeffsmith.com/archive/2011/12/SQL-Developer-tip-viewing-refcursor-output/

Yet as a duty for a beginner is generally do not have the expected solution. Usually, teachers want to see you using a LOOP and dbms_output. something like

DECLARE

Xy CURSOR IS

SELECT whatever

As much as;

BEGIN

FOR r IN xy LOOP

dbms_output.put_line (r.col1 |' # ' | r.col2);

END LOOP;

END;

Of course this suggestion will inaugurate a discussion abusing DBMS output but I keep my position that it is authorized to use it for learning the basics.

Tags: Database

Similar Questions

  • Use the model of multiple data in one report

    You can have several data model and integrated into one report?
    How can I do? Have some examples of how to implement this.

    Yes

    http://download.Oracle.com/docs/CD/E12844_01/doc/BIP.1013/e12187/T518230T518233.htm#4510518

    try to create a report with the two queries.

  • Can you attribute programmatically size when you use the table in the Cluster service cluster

    I use the table of the Cluster service.  The only way I know to the size of the cluster is to right click on the function and set the Cluster size.  But what happens if the length of my table changes?  Is there a way to make the cluster size is the number of elements in the table?  Seems like labview should do this automatically at run time.  There may be some nodes of property I don't know.

    I tried the SQL statements, but it always boils down to having to know the number of columns is in the database prior to execution.

    What I did to generate the object to be a cluster to match database fields.  My recordset is an array of objects.  Then I a vi member to build a recordset from the database and another Member vi to retrieve an array of clusters of the recordset object.  If the database changes, I have to change the subject and these two vi.  All the other Subvi call these two for the manipulation of data.  No other sub - VI have bundle and ungroup functions in them, only the vi of two members.  Thus a change in the database requires a change of control and two vi.  Not too bad.

    (I'm tooting my Horn in choosing me as accetped solution provider.  I learned this bad habit of others here on the forum.  )

  • Can I get the total number of records that meet the conditions of a query using the Table API?

    Hello

    A < row > TableIterator is returned when I ask operations using the index of tables. If I want to get the total number of records, I count one by one using the returned TableIterator < row >.


    Can I get the total number of records directly meets the conditions of the query?

    I can get the total number of records directly the request of the meeting of the conditions of CLI using the command Global table - name tableName - count - index index-name-field fieldName - start startValue-end endValue.

    Can I get the same results using the Table API?

    I used MongoDB and NoSQL Oracle for about a year. According to the experience of the use of these dbs, I think mongoDB querying interface is powerful. In the contras, the query interface is relatively simple, which results is a lot of work that is usually a long time in the client side.

    Hello

    Counting records in a database is a tricky thing.  Any system that gives you an accurate count of the records will have a hotspot of concurrency on updates, namely the place where the counting is maintained.  Such a count is a problem of performance in addition to competitive access problem.   The problem is even more difficult in a system widely distributed such a NoSQL database.

    The CLI has overall command that counts, but does so by brutal force - iterate keys that correspond to the parameters of the operation.  This is how you must do this within the API.  There is not a lot of code, but you have to write.  You certainly want to use TableIterator TableAPI.tableKeysIterator (), because a key iteration is significantly faster than the iteration of lines.  Just one iteration and count.

    If you use TableAPI.multiGet () and a key with a touch of brightness full then, in fact, count the results as they are returned in a single piece (a list).

    Kind regards

    George

  • Why I can't create indexes on the table of RDF data

    When I tried to create indexes on the table of RDF data, it always say the table or view does not exist. I created the RDF model using java codes:

    Oracle Oracle = new Oracle ("jdbc:oracle:thin:@localhost:1521:orcl", "system", "123");

    Chart GraphOracleSem = new GraphOracleSem (oracle, "test2");


    And used the following commands in sqlplus to create indexes:

    SQL >

    SELECT THE SEPARATE OWNER, OBJECT_NAME

    FROM DBA_OBJECTS

    WHERE TYPE_OBJET = 'TABLE '.

    4. AND OBJECT_NAME like ' % TEST2;

    OWNER

    --------------------------------------------------------------------------------

    OBJECT_NAME

    --------------------------------------------------------------------------------

    SYSTEM

    TEST2_NS

    SYSTEM

    RDFB_TEST2

    SYSTEM

    TEST2_TPL

    OWNER

    --------------------------------------------------------------------------------

    OBJECT_NAME

    --------------------------------------------------------------------------------

    SYSTEM

    RDFC_TEST2


    SQL > connect as sysdba

    Enter the password:

    Connected.

    SQL >

    SQL >

    SQL > select * from TEST2_TPL;

    Select * from TEST2_TPL

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    SQL > CREATE INDEX test2_sub_idx ON TEST2_TPL (triple. GET_SUBJECT());

    CREATE INDEX test2_sub_idx ON TEST2_TPL (triple. GET_SUBJECT())

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    Hi Shifu,

    It is not recommended to use the SYS or SYSTEM to store/manage schema graph RDF data.

    Can you please try the following in a SQL * more terminal?

    SQL > conn system/eu1

    Connected.

    SQL >

    SQL >

    SQL > create user graphuser identified by graphuser;

    Created by the user.

    SQL > grant connect, resources, unlimited tablespace to graphuser;

    Grant succeeded.

    SQL > conn graphuser/graphuser

    Connected.

    SQL > create table graph_tpl (triple sdo_rdf_triple_s) compress;

    Table created.

    SQL > sem_apis.create_sem_model exec ('graphic', 'graph_tpl', 'three');

    PL/SQL procedure successfully completed.

    SQL > insert into graph_tpl values (sdo_rdf_triple_s ('graph', '', '', ''));

    1 line of creation.

    SQL > select count (1) in the mdsys.rdfm_graph;

    1

    You see the same result?

    Thank you

    Zhe Wu

  • Using the index of multiple values

    Hi guys,.

    Trying to assess the benefits of the addition of index of multiple values, a quick question on the index of multiple values:

    Here's my content from the cache:

    Key (EmpID), value [employee (age int, double salary, Department of String)]
    (1, new employee (25, 35000.0, "Admin"));
    (2, new employee (22, 30000.0, "Admin"));
    (3, new employee (34, 40000.0, 'Communications'));
    (4, new employee (36, 41000.0, "Admin"));
    (5, new employee (36, 42000.0, "HR"));
    (6, new employee (29, 30000.0, "HR"));
    (7, new employee (51, 50000.0, "BackOffice"));
    (8, new employee (36, 35000.0, "HR"));
    (9, new employee (46, 45000.0, "Admin"));
    (10, new employee (48, 47000.0, "HR"));

    If I still want to find all employees in the 'Human resources' Department and whose salary is more than 35000.

    Eventually, I would like to do the following:
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    cache.addIndex (salExtractor, false, null);
    cache.addIndex (depExtractor, false, null);

    EqualsFilter departmentFilter = new EqualsFilter (depExtractor, 'HR');
    GreaterFilter salFilter = new GreaterFilter (salExtractor, 35000);
    Filter allFilter = new AllFilter (new filter [] {departmentFilter, salFilter});
    Employees value = cache.entrySet (allFilter));

    For my usecase above how can I use the indexing of multiple values to the same query?
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    MultiExtractor mExtractor is new MultiExtractor (new ValueExtractor [] {salExtractor, depExtractor});.
    cache.addIndex (mExtractor, false, null);

    But how can I use the extractor to create multivalued filter queries for employees in the Department of human resources with greater than 35000 salary? Any ideas are much appreciated.


    Thank you

    D wrote:
    Hi guys,.

    Trying to assess the benefits of the addition of index of multiple values, a quick question on the index of multiple values:

    Here's my content from the cache:

    Key (EmpID), value [employee (age int, double salary, Department of String)]
    (1, new employee (25, 35000.0, "Admin"));
    (2, new employee (22, 30000.0, "Admin"));
    (3, new employee (34, 40000.0, 'Communications'));
    (4, new employee (36, 41000.0, "Admin"));
    (5, new employee (36, 42000.0, "HR"));
    (6, new employee (29, 30000.0, "HR"));
    (7, new employee (51, 50000.0, "BackOffice"));
    (8, new employee (36, 35000.0, "HR"));
    (9, new employee (46, 45000.0, "Admin"));
    (10, new employee (48, 47000.0, "HR"));

    If I still want to find all employees in the 'Human resources' Department and whose salary is more than 35000.

    Eventually, I would like to do the following:
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    cache.addIndex (salExtractor, false, null);
    cache.addIndex (depExtractor, false, null);

    EqualsFilter departmentFilter = new EqualsFilter (depExtractor, 'HR');
    GreaterFilter salFilter = new GreaterFilter (salExtractor, 35000);
    Filter allFilter = new AllFilter (new filter [] {departmentFilter, salFilter});
    Employees value = cache.entrySet (allFilter));

    For my usecase above how can I use the indexing of multiple values to the same query?
    ValueExtractor salExtractor = new PofExtractor (Integer.class, 2);
    ValueExtractor depExtractor = new PofExtractor (String.class, 3);
    MultiExtractor mExtractor is new MultiExtractor (new ValueExtractor [] {salExtractor, depExtractor});.
    cache.addIndex (mExtractor, false, null);

    But how can I use the extractor to create multivalued filter queries for employees in the Department of human resources with greater than 35000 salary? Any ideas are much appreciated.

    Thank you

    I remember, values multiple index refers to a different concept: a multivalued index means that you can retrieve a collection of values of similar role of an attribute on which you can do Contains, ContainsAll filtering, and ContainsAny.

    In this case to fully the lever consistency of querying capabilities, you would
    - either add a sorted index with a custom comparator that compares the tables containing a salary and a Department on a first salary so the base of the Department and add a filter custom which is able to take advantage of the index for the request for the salary and also able to filter on the element of the array of index service
    -Add two independent indices (a sorted index of wages and a unsorted for the Department), in which case you can leverage all existing (GreaterThanFilter, EqualsFilter and AndFilter) code

    Best regards

    Robert

  • How to use the TRUNC function with dates in the expression builder in OBIEE.

    Hello
    How to use the TRUNC function with dates in the expression builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns 1 July 2010"where sysdate is July 15, 2010 ' in SQL. I need to use the same in the expression builder in the logical layer mdb column.


    Thanks in advance

    Use it instead:
    TIMESTAMPADD (SQL_TSI_DAY, (DAYOFMONTH (CURRENT_DATE) *-1) + 1, CURRENT_DATE)

  • Display several values on the front using the table

    For example, if I enter "10" for number of datapoints, I want to see 10 hexadecimal and binary all values in a column. At present, only 1 value appears and erasing all of the previous values

    Thank you!

    You do not use a shift register to store the values in the table between the fo the loop iterations For.

    It is a fundamental concept of LabVIEW.

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • GPF using the Table control

    Hello world

    We use a table control to display the log files. Each row of the table represents a log file entry. In addition to that we have put in place

    Some filter chopsticks (string tonalite) to speed up filtering. This means that only the entries corresponding to these substrings are shown. So whenever the filter options

    changed to renew the contents of the table.

    This is done by DeleteTableRows, looking for entries to display, InsertTableRows and SetTableCellRangeVals.

    It works very well.

    But if we remove all the contents of the table (caused by the filter options) and then hit a button (even if the focus is on the table) you get a GPF on ProcessSystemEvents.

    This occurs only after inserting a large number of rows in the table before deleting all the. For example, a table with 5000 x 2 (rowsxcolumns) reduced to 0x2.

    1 create a table with 5000 x 2 (rows x columns) control elements.

    2 remove all lines

    3. press tab until the control panel to get the focus.

    4. hit Enter for example

    => Crash

    Someone has an idea? We have already 'dimmed' CTRL, but this is not enough to avoid that the focus on the table by pressing the tab key. So, which leads to an accident as well.

    Thanks for the help

    Philipp

    Yes, it is a known issue (396240), although it is not actually on time last updated known issues. Unfortunately there is no good solution, other than just by waiting for a version corrected to be released, which should happen soon.

    Luis

  • How to find the interface using the table name target

    Hi friends,

    Whether it's with the help of the name of the target table, it is possible to find the name of the interface that invokes this target in ODI 11.1.1.7 table.

    Thanks in advance.

    Kind regards

    Saro

    Highlight the data in the browser store, expand its sub-tree, there is a node "filled in", under the node, it lists all the data stores that are used as sources for the current data store

    then expand "used by"-> interfaces, it will display all interfaces include the current data store (but maybe the current data store is used as a source)

    That's all you can get user interface, otherwise I guess you can use the SDK.

  • Use the table 2D input and output dll

    Hi, I have a problem with table 2D used with library funtion call to get the table of DLL.

    uint16_t is defined as unsigned short, who is unsigned 16-bit in labwindows.

    In the following two codes origFrame.height is 1024, 1280 origFrame.width.

    QCam_Err DLLEXPORT FrameGrab(void* handle, uint16_t frame2D[1024][1280]) {}

    uint16_t * p;
    p = (uint16_t *) origFrame.pBuffer;
    Copy each pixel of the 2D array
    for (int i = 0; i)
    for (int j = 0; j)
    frame2D [i] [j] = * p ++;
    }
    }
    }

    2D array is passed to the DLL in the form table 1 d, I also tried table 1 d below but to get the same numerical results.

    {QCam_Err DLLEXPORT FrameGrab(void* handle, uint16_t *frame1D)
    uint16_t * p;
    p = (uint16_t *) origFrame.pBuffer;
    for (int i = 0; i)<(origFrame.height*origFrame.width);>
    frame1D [i] = * p ++;
    }
    }

    Both of these methods gives me the same numeric result with regard to the numbers in the output array.

    Something interesting is that the output array has the right size, but all the numbers in the table are about ~ 40, while my expected in all values table is 60.  I know, because I use this to get values of a pixel in a camera and I know that the values of the pixels.  I also used the same code in LabwindowsCVI as a normal program built as exe.  Everything works fine and I get my expected values.  So apparently miss me something here, when I changed the settings to make dll.

    What I've done wrong?  Thank you very much for your help!

    Best,

    Charles


  • Use the table of numbers as "item select to compare.

    Greetings,

    I'm curious to know how to use an array of numbers as value in the tab select edit ideally my "case" would execute an expression "Contains(Locals.arrayofnumbers,0)."

    Basic principle:

    1 Labview VI launches with ListBox containing all tests (multiple selections enabled)

    OUTPUT is an array of I32.

    2 I32 table is attributed to Locals.arrayofnumbers

    3 Locals.arrayofnumbers is used with the element select 'compare '.

    4. each CASE has the statement... "next" Contains(Locals.arrayofnumbers,#)

    * each case would have 1 sequence to run *.

    Currently TS throws an error prompt indicating that the Select step expected number, that is the table of numbers.

    I already found a solution quick and pretty clean by instituiting just a condition prior to each sequence and captured to eliminate flow control all together. But I prefer not to use prerequisites for global flow control if possible and use controls to rate as expected.

    I have used TS help, but don't quite give me what I needed. Maybe I didn't use the correct search string. The forum here, is the same. I'm sure that the answer may be there, but maybe I'm using the wrong search string.

    Thanks in advance for any help.

    To SUM UP: User selects (via LabVIEW listbox) 1 - n tests to be run (output table I32). I32 table is used for the selection of the case by evaluating "contains (Local.arrayofnumbers, 0).

    Kind regards

    chazzzmd78

    Honestly, a Select System / box is the wrong choice for what you do.  I'd go with the prerequisite options.  It reduces the number of steps of TestStand.

    In your case you just to see whether something exists or not in a table.  Ideally, you will use the Select operations / box when you have 1 selected option of many.  I suppose you're a loop around the case select so that you can run all the tests so that your code looks something like this:

    For N (N is the number of tests they have selected)

    Select Locals.ArrayOfNumbers

    Briefcase (Locals.ArrayOfNumbers, 1).

    Run test 1

    Briefcase (Locals.ArrayOfNumbers, 2)

    Run the test 2

    Select close

    Closing loop

    If you want to use the Select option / box correctly I would like this:

    Item ForEach in Locals.ArrayOfNumbers (assign the item being Locals.i)

    Select Locals.i

    Case 1

    Run test 1

    Case 2

    Run the test 2

    Select close

    Close ForEach

    I hope that makes more sense.  If you have any questions let me know.

    Kind regards

  • using the table grid

    Hi all

    I have a 2D array of 8-bit binary data.

    I want to add data to a table and change the color of each cell according to the values of data in the following way
    If any bit of the 8-bit data is '1' the cell must be red otherwise the cell will be green.

    is one of the necessary additional options

    I want to show the Red or green in the main of the front pane. By clicking on this grid in particular, the 8-bit value should appear in a new window.

    Help, please.
    M a newbie to Labview.

    Thanks in advance.

    ni4me wrote:

    Hello

    I am able to view the results in the grid

    But I'm stuck to call the find.vi to get the details of a particular cell when you press the button «Get the details»

    Help, please

    First of all, you need to implement a design that allows the vi to terminate without having to press the button abandon.

    Second, if you do not wrap the structure of the event in a while loop it will run only once, probably not what you want.

    For details of the table cell that has been the press, you need to use the mouse pressed event Table. Create a Table invoke node and select the Point in the row column method. The release of details of the data node event left thread entry point of the invoke node. If ungroup you the exit CellPosition of the invoke node, you will get the values of line and column of the Table cell that was pressed. Feed these values to your Find vi.

    The vi Find flashes only open if we leave it as it is. You need to change to make it work until the user perform an action.

    Ben64

  • cluster using the table

    I am relatively new to the use of clusters for this purpose.

    Is there a way to try to do what I've shown in the clip below?

    The bulit clustered to table isn't really any try because then I have to index or use the subset of the array to get the appropriate filepaths or visa sessions.

    what you have now is fine if you have more than five elements, and you don't want to extract some

  • How can I resize a table directly (without using the table to remodel)?

    Hello world

    I have a porgam in which I use a table as a command (with specific values that goes from the user before running the program). By mistake at the beginning, I created a table of 4 dimension (for example), but I didn't because I was showing only the first 3 values (not to expand the table to 4 or more). I would now like to change the size of the array of 4-3. I don't seem to be able to find an option (right click on the table) which allows me to do so directly. I don't want to use the icon "reshape the table", because it is not what I want to do. I hope I am clear enough.

    Thanks for any help,

    Kind regards

    Marc

    • Right click on the additional array element, then... Select 'delete data operations.
    • Now go to the menu bar and not "current default values edit..make'
    • Save the VI.

Maybe you are looking for