Need help! Working with SQL databases

Hi all

I am currently working on an application that interacts with a SQL database, and it seems to have hit a roadblock.

I have a multi-column list box on my front which is filled with the data extracted from the database. By choosing one of the lines in the list box, another opens showing another set of data retrieved by a generated SQL query. At the moment I only select one line at a time to see it has the data, but I want to expand such that I can select mutiple rows in the list both box and see all their relevant data.

With only one selection, I can switch the index value of the selection of a function table of Index with the database as another entry and build my SQL statement.

But with multiple choices, I guess I have to build a table on the index values and use them as reference to build the SQL statement. And I don't know how exactly to do that.

Here is the code that I currently work for a single selection in the drop-down list.

Any help is appreciated. See you soon.

tdog says:

Hi all

I am currently working on an application that interacts with a SQL database, and it seems to have hit a roadblock.

I have a multi-column list box on my front which is filled with the data extracted from the database. By choosing one of the lines in the list box, another opens showing another set of data retrieved by a generated SQL query. At the moment I only select one line at a time to see it has the data, but I want to expand such that I can select mutiple rows in the list both box and see all their relevant data.

With only one selection, I can switch the index value of the selection of a function table of Index with the database as another entry and build my SQL statement.

But with multiple choices, I guess I have to build a table on the index values and use them as reference to build the SQL statement. And I don't know how exactly to do that.

Here is the code that I currently work for a single selection in the drop-down list.

Any help is appreciated. See you soon.

Regarding the table of construction:

I can see Hat multicolumn listbox you have multiselection enabled and is limited to one or zero element selected at a time. To allow multiselction; Done just right click your multi-column listbox and change your selection to support multiple selected items. The NewVal to the structure of the event should change to a single index number in a 1 d of the numbers indexed table. No coding required. Then just to retrieve all items (since you know the index) and create the quiry. Quiry part, I'm not really (long time no see SQL), but it looks like a loop for to create the chain should do the trick?

Tags: NI Software

Similar Questions

  • Basic needs when working with SQL/PLSQL on Vmware

    Hello Experts;

    I have two question and I need solutions for this.

    I'm working on vmware (oel 4.4) and 10g r2 (10.2.0.1 and 10.2.0.4) database

    When executing PL/SQL programs (if I get the error) and I have to copy / paste.

    MY QUESTIONS:

    1. How can I change a long program (pl/sql code)?  (ed or anything like that)

    2. as many times I want to set < serverouton set > (to avoid on each session) permanent any solution?

    ex:

    SQL > ed

    A written file afiedt.buf

    26

    Select the name of database v$.

    ?

    ?

    ?

    ?

    ?

    -I do the closing session;


    MY OS details:

    $ uname - a

    Linux linuxserver 2.6.9 - 42.0.0.0.1.ELsmp #1 SMP 14:02:40 PDT Sun 15 Oct 2006 i686 athlon i386 GNU/Linux


    MY VERSION OF DB

    SQL > select * from v version $;

    BANNER

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

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

    PL/SQL Release 10.2.0.1.0 - Production

    CORE 10.2.0.1.0 Production

    AMT for Linux: Version 10.2.0.1.0 - Production

    NLSRTL Version 10.2.0.1.0 - Production

    some we used set the editor

    You don't need that. Just add 'export EDITOR = vi' the user profile (as said SY), normally .bash_profile on linux.

  • Help me with SQL Query to retrieve data from a view

    Hello Guru,

    I need help in my sql query.
    I use SQL TeraData.
    I want an Oracle result in the following form-

    Open tickets
    Open months failure / Repair Service s/o improvement request Total general
    2009-01-2 4 4 5 15
    2009-02 1 0 2 3 6
    2009-03 4 1 2 2 9
    Grand Total 7 5 8 10 30


    I wrote the query as where - TIME_PERIOD, RQST_TYPE_DM and DEMAND_SUMMARY_FCT are the points of view and I extract the data from the views only.

    Select NVL (CA. TIME_PERIOD. PERIOD_CD, 'Total') THAT year.
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC Like '% of Break' THEN 1 END) as BreakFix
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC as 'N/a', 1 END) by n/a
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC as 'Improvement' THEN 1 END) accessories
    COUNT (CASE WHEN CA. RQST_TYPE_DM. RQSTTYP_DESC Like '% Service' THEN 1 END) as ServiceRequests
    COUNT (CA. RQST_TYPE_DM. RQSTTYP_DESC) AS grand_total
    FROM CA. TIME_PERIOD, CA. RQST_TYPE_DM, CA. DEMAND_SUMMARY_FCT
    WHERE (CA. DEMAND_SUMMARY_FCT. RQSTTYP_ID = CA. RQST_TYPE_DM. RQSTTYP_ID)
    AND (CASE
    WHEN CA. DEMAND_SUMMARY_FCT. MONTH_ID = CA. TIME_PERIOD. PERIOD_ID, 1
    WHEN {fn concat ({fn concat (SUBSTR (CA. TIME_PERIOD. {(PERIOD_CD, 3, 4),'-')}, SUBSTR (CA. TIME_PERIOD. PERIOD_CD, 7, 2))} BETWEEN ' 2009-01' AND ' 2009-03' THEN 1
    WHEN CA. DEMAND_SUMMARY_FCT. RQSTTYP_ID = '1' then 1
    END) = 1
    GROUP BY ROLLUP (CA. TIME_PERIOD. PERIOD_CD)

    After executing the query, I get the following error:
    3076: syntax Error: Data Type 'Time' does not match a defined Type name.
    :( Kindly help me with this and let me know where I'm wrong... Please.

    Messages indicates something wrong with your data... It would seem that the data does not match your format mask.

    Thus, the data or the format mask.

  • using the same datamodel with SQL database QML in 2 listviews

    I am using the code for the sample application quotes as starting point. I try to call the same SQL database with the quote template to build a list in the top level of my application and then create a list to the next heirachy.
    For, for example, imagine a list of different types of quotes (funny, sad, happy, etc.) on the home page, then the list of people with their quotes on the 2nd level and their exact quote at the 3rd level. When I use the same quotesModel qml and asyncksource at the top of the list and yet once in 2nd list level I get disconnection issues connect to my SQL database. How would I fix this?

    You only need a data source class, but you will need multiple instances of it.

    The disconnect message means that the new connection is now that of the database of driving. Will there be other errors in the log?

  • Need help - problem with the installation of the Office

    I really hope that someone can help as I have spent HOURS trying to solve this thing with Palm Desktop (DP). My family lives and breathes out of this Palm.

    First of all, I have a Palm Treo phone for half of the year, but a user palm for 4-5 years. I used Datebk6 with absolutely no problem. About three months ago my phone got wet and shorted dirty keyboard. I ordered a new keyboard, installed, and everything was fine. Not sure if this is related, but mentioning the bears.

    Then a few weeks, something has happened. I'm not sure if I've updated something or another user of the computer in the House has done something. Palm desktop, account opening, two icons on the left side of "Palm Desktop" - media and install. No calendar, notes, tasks, all functions that I use. I couldn't print calendars more.

    So first, I uninstalled the Democratic Party amd reinstalled the period off the drive. The Democratic Party looked decent with a calendar, etc., but this version had the "quick installation". When I installed the version on the net which solves the problem of Vista 6.2.2 he placed all my third party apps in an incompatible "apps" folder and the Democratic Party shows install yet once just the icons and media. Once again, no calendar, tasks, memos. However, the phone and its applications still worked OK, everything was there - then...

    I thought that maybe the problem is hotsync during initial installation, so I reset the phone to the original factory settings (erased). Distributed with uninstall and reinstall and it happened again. DARM duration with just the media and install it. No option to open an archive. Previous versions the Democrats have the calendar etc, but of course now without any data. Version 6.2.2 has no calendar, tasks, todo etc.

    I need help. someone at - it suggestions? Where can I go? I need this problem.

    maramac - check if the UAC has been reactivated (User Account Control).  I read in other posts that these latest Windows updates have reactivated UAC on PC of some people of.

    This could also cause the problem you are experiencing.

    Control user/accounts/Turn User Account Control OFF.

    WyreNut

  • I lost my CDR psw2 and I need to find a copy. I change my PC and need to work with my singer XL6000.give me the price of a valid copy.

    I change my PC and I would like to work with my machine embroidery XL6000.

    But when I want to recharge my cdr PSW2, I never found it.

    I'm looking for the COR only because I have a converter for it.

    I only CDR, I don't need all the others. I'm in France.

    Thanks a lot for a copy.

    Best regards

    Marie-Paule PALLUD

    Hi Marie-Paule PALLUD,.

    I recommend you contact the manufacturer for assistance:

    http://www.singerfrance.com/Nuxeo/site/singer/acceuil

  • need help to write sql code

    Hi all

    I need to write a sql that retrieves data from the status table and check for this time in the ESHIFT table if the flag was or not. If is there, then it will keep the record as it is Furthermore, there

    did not understand at the time the flag was N suppose ESHIFT table has one record where you N 13:00:01-13:30 then the status register which is 13:00-13:59 min 59 s, we should get 13:00 - 13: records of 00:00 1 and 2 of 13:30:01-13:59 min 59 s

    create table ESHIFT (From_date date, date, to_date, flag varchar2 (2));

    insert into ESHIFT values (' 1 February 12 09:00 ", February 1, 12 13:20 ', 'Y');

    insert into ESHIFT values (' 1 February 12 13:20:01 ", 1 February 12 13:30 ',' don't);

    insert into ESHIFT values (' 1 February 12 13:30:01 ", February 1, 12 16:00 ', 'Y');

    SELECT * from eshift;

    create table status (date of From_date, to_date date, status number);

    insert into values of status (1 February 12 11:00 ', February 1, 12 12:00 ', 1);

    insert into values of status (1 February 12 12:00:01 ', February 1, 12 12:20 ', 2);

    insert into status values ("1 February 12 12:20:01", 1 February 12 12:59:59 ', 1);

    insert into status values ("1 February 12 13:00", February 1, 12 13:59:59 ', 1);

    insert into status values ("1 February 12 14:00", February 1, 12 14:59:59 ', 2);

    SELECT * STATUS;

    In the case above should get sql

    1 FEBRUARY 12 11:00 1ST FEBRUARY 12 12:00 1

    FEBRUARY 1ST, 12 12:00 1ST FEBRUARY 12 12:20 2

    FEBRUARY 1ST, 12 12:20:01, 1 FEBRUARY 12 12:59:59 1

    FEBRUARY 1ST, 12 13:00 1ST FEBRUARY 12 13:20 1

    FEBRUARY 1ST, 12 13:30 1 FEBRUARY 12 13:59:59 1

    FEBRUARY 1ST, 12 14:00 1 FEBRUARY 12 14:59:59 2

    It will be really great if someone can help me how I can get the desired result.

    Thank you very much in advance.

    Please provide instructions creating table and data. It makes it so much easier to answer.

    I think you want:

    Select (s.from_date, e.from_date) greatest from_date, less (s.to_date, e.to_date) to_date, s.status

    s status e eshift join on s.from_date < e.to_date="" and="" s.to_date=""> e.from_date and e.flag = 'Y '.

    order by 1

  • APEX 3.1.2 works with Oracle Database 10g?

    APEX is included in Oracle Database 10g? If not, and if I uploaded it separately, will it work with an Oracle 10 g database on Linux installation?

    I tried is the companion of the Oracle 10 g, but this CD seems HTML_DB worm: 1.6 or something.

    where can I find an installation guide for installation of the APEX 3.1.2 on Oracle database 10g linux because all the scenarious installation I found seem to be for oracle 11g database or oracle 10g application server.

    Thank you.

    Request Express is not provided with 10g but as Paulo said, he will work with Oracle 9.2.0.3 or later. You can download it using the links on the pages, he said.

    Scott

  • Time lapse help working with xdcam ex workflow

    Hi all

    I have a sony ex3 and working with xdcam ex codec - I have a time-lapse sequence of JPEG images that are long 22 seconds

    When I'm trying to make it in 1920 x 1080 @ 25 fps using several methods and formats I keep ending up with 3 GB file sizes and more

    / 3 gb is crazy for a clip of 22sec

    Those someone has suggestions on the correct setting to use when rendering the above sequence

    I'm using cs5

    Thank you and best regards

    P.

    Ireland

    / 3GB is not crazy at all for 22 seconds of uncompressed HD video.

    Depending on what you want to do with the film long term, you can return on an intermediate rendering without loss (something like a Quicktime movie using the PNG compression) and then compress this film using Adobe Media Encoder (or a similar compression tool) in a format of delivery more suited to your file size concerns (i.e. 2-pass VBR h.264 encoding with flow). If you do not have the storage, then you can always ditch the not compressed / lossless compressed after that you have your final product. The reason for which you would like the middle stage is then you can get the best possible compression. XDCAM (whatever flavor you're using) is a highly compressed codec and limiting the acquisition. You don't want to go to him, most likely.

    So, the question is, what will you do with your final product? Web site?

  • Virtual Center working with SQL 2005

    Hello everyone

    I'll install SQL 2005 and VC 2.5 on the same server.  Y at - it special "witch hunt" I need to know?

    Also, when I installed SQL 2005 on the same server that run VC, he installed IIS. I know that Apache will

    be installed with VC.  What I do on IIS?

    For the question look at IIS application this post - http://communities.vmware.com/message/1098932;jsessionid=0575DBF4BCDBCEAF1777E067F0ED308B - IIS is installed for SQL 2005 Reporting Services.

    Also note that you can change the port used by Tomcat if IIS uses the default values.

    As for the installation of the server database on the same machine as the VC server, there are pros and cons to do. If they reside on the same server, the network connection between them will be no less a problem, and on the side, as is the VC porbably server you wouldn't create many other databases not VI - therefore you are using a version full SQL license to host a few databases.

    Best regards, was

  • Need help working Oracle/PHP to ASP/Oracle conversion

    I don't know if it's the right place, but I was pulling my hair out trying to convert a PHP page in VBScript (ASP) without a bit of luck to all. Hours of research on Google and trial and error and grrrr... I hope someone can help.

    I am new to Oracle and PHP, but old in ASP/VBScript

    Windows Server 2003 R2
    IIS
    PHP

    I have an Oracle procedure on a remote computer on which I can NOT change. Out of my control. There is a PHP page on a web server that calls it and works very well. My boss wants me to convert the PHP ASP script (I know, but I have to work within those parameters. Sorry). On the one hand, I can't find many examples of the use of ASP with Oracle procedures. And those that I find are not complete examples or are displayed as questions. Everything I've tried so far either causes an error message I don't understand or not errors, but no data either. So, here is what I got:

    CREATE OR REPLACE PROCEDURE X_Doc_Num_Query)
    p_doc_num in VARCHAR2
    )
    AS

    -variables

    v_curr_sos_ric Pkg.curr_sos_ric%TYPE: = NULL;
    v_data VARCHAR2 (1000): = NULL;
    v_depot_ric Pkg.depot_ric%TYPE: = NULL;
    v_doc_num Rqn.Doc_Num%TYPE: = NULL;
    v_dodaac Rqn.cnsgne_dodaac%TYPE: = NULL; v_found_pkg BOOLEAN: = FALSE;
    v_found_rqn BOOLEAN: = FALSE;
    v_ic_cl_of_supply_cd Item_Control.cl_of_supply_cd%TYPE: = NULL;
    v_index directory: = 0;
    v_itcn Pkg.itcn%TYPE: = NULL;
    v_lca_inst Cddb_Force.lca_inst%TYPE: = NULL;
    v_pkg_niin Pkg.niin%TYPE: = NULL;
    v_proj_cd Rqn.proj_cd%TYPE: = NULL;
    v_rqn_niin Rqn.niin%TYPE: = NULL;

    -variables defined by the procedures define_status and package pkg_procsusl v_errcd VARCHAR2 (10): = NULL;
    v_errmsg VARCHAR2 (600): = NULL;
    v_errproc VARCHAR2 (30): = NULL;
    v_syserr BOOLEAN: = FALSE;

    -the variables defined by the procedure define_status

    v_status_cd VARCHAR2 (2): = NULL;
    v_status_dt DATE: = NULL;

    -package pkg_procsusl-defined variables

    v_citcn Ship_Unit.citcn%TYPE: = NULL;
    v_dep_ship_su Ship_Unit.dt_dep_ship%TYPE: = NULL;
    v_dt_ccps Ship_Unit.dt_ccps%TYPE: = NULL;
    v_dt_crpr Ship_Unit.dt_crpr%TYPE: = NULL;
    v_dt_hubr Ship_Unit.dt_hubr%TYPE: = NULL;
    v_dt_hubs Ship_Unit.dt_hubs%TYPE: = NULL;
    v_dt_lift SL.dt_lift%TYPE: = NULL;
    v_dt_ssar Ship_Unit.dt_ssar%TYPE: = NULL;
    v_dt_umfps Ship_Unit.dt_umfps%TYPE: = NULL;
    v_hub_tcn Ship_Unit.hub_tcn%TYPE: = NULL;
    v_mfst_ref SL.mfst_ref%TYPE: = NULL;
    v_mfst_sta SL.mfst_sta%TYPE: = NULL;
    v_mod_shp Ship_Unit.mod_shp%TYPE: = NULL;
    v_mode VARCHAR2 (10): = NULL;
    v_msn_num Flt.msn_num%TYPE: = NULL;
    v_save_erl_poel SL.dt_poel%TYPE: = NULL;
    v_save_erl_poel_pair SL.dt_poel%TYPE: = NULL;
    v_save_erl_poer SL.dt_poer%TYPE: = NULL;
    v_save_erl_poer_pair SL.dt_poer%TYPE: = NULL;
    v_save_lat_podf Ship_Unit.dt_podf%TYPE: = NULL;
    v_save_lat_podf_pair Ship_Unit.dt_podf%TYPE: = NULL;
    v_save_lat_podr Ship_Unit.dt_podr%TYPE: = NULL;
    v_save_lat_podr_pair Ship_Unit.dt_podr%TYPE: = NULL; v_pod Ship_Unit.pod%TYPE: = NULL;
    v_poe SL.poe%TYPE: = NULL;
    v_voyage_no SL.voyage_no%TYPE: = NULL;
    v_tdi Ship_Unit.tdi%TYPE: = NULL;

    -cursors

    CURSOR c_rqn (doc_num_in VARCHAR2) IS
    SELECT *.
    OF tangible
    WHERE doc_num = doc_num_in;

    CURSOR c_pkg (doc_num_in VARCHAR2) IS
    SELECT *.
    PKG
    WHERE doc_num = doc_num_in
    AND sup_pipe_cat <>'OB '.
    AND sup_pipe_cat <>"IA";

    -documents

    r_pkg Pkg % ROWTYPE;
    r_rqn tangible % ROWTYPE;

    -- functions ---------------------------------------------------------

    FUNCTION Find_Lca_Inst (dodaac_in VARCHAR2)
    RETURN VARCHAR2
    IS

    v_lca_cd Cddb_Force.lca_inst%TYPE;

    BEGIN

    SELECT lca_inst from v_lca_cd
    OF Cddb_Force
    WHERE dodaac = dodaac_in;
    RETURN v_lca_cd;

    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURNS A NULL VALUE.
    WHILE OTHERS THEN
    LIFT;

    END Find_Lca_Inst;

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

    FUNCTION Find_Supply_Cd (niin_in VARCHAR2)
    RETURN VARCHAR2
    IS

    v_supply_cd Item_Control.cl_of_supply_cd%TYPE;

    BEGIN

    SELECT cl_of_supply_cd from v_supply_cd
    OF Item_Control
    WHERE only = niin_in;
    RETURN v_supply_cd;

    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    RETURNS A NULL VALUE.
    WHILE OTHERS THEN
    LIFT;

    END Find_Supply_Cd;

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

    BEGIN

    DBMS_OUTPUT. ENABLE (2000000);
    v_doc_num: = upper (p_doc_num);

    OPEN c_rqn (v_doc_num);
    LOOP

    SEEK c_rqn INTO r_rqn;
    EXIT WHEN c_rqn % NOTFOUND;
    v_found_rqn: = TRUE;
    v_dodaac: = NVL (r_rqn.cnsgne_dodaac, r_rqn.s_cnsgne_dodaac);
    v_rqn_niin: = NVL (r_rqn.niin, r_rqn.s_niin);
    v_proj_cd: = NVL (r_rqn.proj_cd, r_rqn.s_proj_cd);
    IF v_dodaac IS NOT NULL THEN
    v_lca_inst: = FIND_LCA_INST (v_dodaac);
    ON THE OTHER
    v_lca_inst: = NULL;
    END IF;

    -output of tangible column values

    DBMS_OUTPUT. Put_LINE ('Tangible database');

    v_data: = r_rqn.doc_num | '|' || r_rqn.req_geo_flag | '|' ||
    r_rqn.estb_dic | '|' || r_rqn.niin | '|' ||
    r_rqn.asg_cd | '|' || r_rqn. Qty | '|' ||
    r_rqn.unit_price | '|' || r_rqn.dmd_cd | '|' ||
    v_proj_cd | '|' || r_rqn. Priority | '|' ||
    r_rqn. RDD | '|' || r_rqn.cl_of_supply_cd | '|' ||
    To_char(r_rqn.dt_rqn_estb,'MM/dd/yyyy'). '|' ||
    To_char (r_rqn.dt_first_bo, "MM/DD/YYYY '") | ' |' |
    To_char (r_rqn.dt_first_can_req, "MM/DD/YYYY '") | ' |' |
    r_rqn.supadd | '|' || r_rqn. UI | '|' ||
    v_lca_inst | '|' || r_rqn.sig_cd | '|' ||
    r_rqn.fd_cd | '|' || r_rqn.med_stat_cd | '|' ||
    r_rqn.ssf_flag | '|' || To_char (r_rqn.lst_updt, "MM/DD/YYYY");
    DBMS_OUTPUT. Put_line (v_data);
    DBMS_OUTPUT. Put_line ('PKG database');
    OPEN c_pkg (v_doc_num);
    LOOP

    SEEK c_pkg INTO r_pkg;
    EXIT WHEN c_pkg % NOTFOUND;
    v_found_pkg: = TRUE;
    v_curr_sos_ric: = NVL (r_pkg.curr_sos_ric, r_pkg.s_curr_sos_ric);
    v_depot_ric: = NVL (r_pkg.depot_ric, r_pkg.s_depot_ric);
    v_pkg_niin: = NVL (r_pkg.niin, r_pkg.s_niin);

    IF v_pkg_niin IS NOT NULL THEN
    v_ic_cl_of_supply_cd: = Find_Supply_Cd (v_pkg_niin);
    ON THE OTHER
    v_ic_cl_of_supply_cd: = NULL;
    END IF;

    Define_Status (r_pkg,
    v_status_cd,
    v_status_dt,
    v_syserr,
    v_errcd,
    v_errmsg,
    v_errproc
    );
    IF v_syserr THEN
    DBMS_OUTPUT. Put_line (' ERROR in Define_Status: ' | v_errmsg);
    EXIT;
    END IF;
    v_itcn: = NULL;
    Pkg_Procsusl.Process_Susl ('XT',
    r_rqn.req_geo_flag,
    r_pkg. STCN,
    v_itcn,
    v_dodaac,
    v_dt_crpr,
    v_dt_ccps,
    v_dt_hubr,
    v_dt_hubs,
    v_dt_ssar,
    v_dt_lift,
    v_dt_umfps,
    v_save_erl_poel,
    v_save_erl_poel_pair,
    v_save_erl_poer,
    v_save_erl_poer_pair,
    v_save_lat_podf,
    v_save_lat_podf_pair,
    v_save_lat_podr,
    v_save_lat_podr_pair,
    v_dep_ship_su,
    v_mode,
    v_mod_shp,
    v_mfst_ref,
    v_mfst_sta,
    v_msn_num,
    v_pod,
    v_poe,
    v_voyage_no,
    v_tdi,
    v_citcn,
    v_hub_tcn,
    v_errcd,
    v_errmsg,
    v_errproc,
    v_syserr
    );
    IF v_syserr THEN
    DBMS_OUTPUT. Put_line (' ERROR in Pkg_Procsusl: ' | v_errmsg);
    EXIT;
    END IF;

    v_data: = r_pkg.doc_num | '|' || r_pkg.pkg_id | '|' ||
    Trim (r_pkg.input_stk_num) | '|' || v_status_cd | '|' ||
    To_char (v_status_dt, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_est_ship, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_rel, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_dep_ship, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_rcpt, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_maint_ret_rcpt, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_idt_rcpt, "MM/DD/YYYY '") | ' |' |
    To_char (r_pkg.dt_mrd, "MM/DD/YYYY '") | ' |' |
    v_curr_sos_ric | '|' || v_pkg_niin | '|' ||
    r_pkg. Qty | '|' || v_depot_ric | '|' ||
    r_pkg.ssf_flag | '|' || r_pkg. UI | '|' ||
    r_pkg.sfx_cd | '|' || r_pkg.direct_fill | '|' ||
    r_pkg. STCN | '|' || v_ic_cl_of_supply_cd | '|' ||
    To_char (v_dt_ssar, "MM/DD/YYYY '") | ' |' |
    To_char (v_dt_crpr, "MM/DD/YYYY '") | ' |' |
    To_char (v_save_lat_podr, "MM/DD/YYYY");
    DBMS_OUTPUT. Put_line (v_data); END LOOP;
    CLOSE C_pkg;
    EXIT;

    END LOOP;
    CLOSE C_rqn;
    IF this is v_found_rqn THEN
    DBMS_OUTPUT. Put_line (' NO data available for doc_num = ' | v_doc_num);
    END IF;

    EXCEPTION

    WHILE OTHERS THEN
    IF c_rqn % ISOPEN THEN
    CLOSE C_rqn;
    END IF;
    IF c_pkg % ISOPEN THEN
    CLOSE C_pkg;
    END IF;
    DBMS_OUTPUT. PUT_LINE (' ERROR: ' |) SQLERRM);

    END X_Doc_Num_Query;
    /

    ===================================
    ===================================

    Here is the PHP page:

    <? PHP
    error_reporting (0);

    PutEnv("TNS_ADMIN=e:/oracle/ora92/network/ADMIN");
    PutEnv("LD_LIBRARY_PATH=E:/Oracle/ora92");
    PutEnv ("NLS_LANG = English_America.WE8ISO8859P1");

    $don = isset($_REQUEST["don"])? $_REQUEST ['gift']: "asdf1234"; If no value passed, use the value of test
    Enable or DISABLE dbms_output.
    function SetServerOutput ($con, $p)
    {
    If ($p)
    $s = "BEGIN DBMS_OUTPUT. ENABLE (1000000); END; « ;
    on the other
    $s = "BEGIN DBMS_OUTPUT. DISABLE(); END; « ;

    $r = false;
    $stid = doParse ($con, $s);
    If {($stid)
    $r = doExecute ($stid);
    @OCIFreeStatement ($stid);
    }
    Return $r;
    }

    Retrieve and display any dbms_output
    function DisplayDbmsOutput ($con)
    {
    $r = GetDbmsOutput ($con);
    $cnt = sizeof ($r);
    If (! $r)
    print ' < p > no dbms_output < /p > \n ";
    on the other
    $orders = $r;
    $number_of_orders = count ($orders);
    If ($number_of_orders == 0)
    {echo "< p > < strong > no orders pending."}
    Please try again later. < facilities > < / p > ';
    }
    echo "< body leftmargin = 0 topmargin = 0 > ';
    for ($i = 0; $i < 1; $i ++)
    {
    $line2 = explode ("|", $orders [$i]);
    echo "< BR > < b > $line2 [0] < /b >."

    }
    for ($i = 1; $i < 2; $i ++)
    {
    $line2 = explode ("|", $orders [$i]);

    echo "< table border = 1 bordercolor = #000000 cellpadding = 2 cellspacing = 0 > \n < TR > < th bgcolor = Color #FFFFFF = #000000 > DON < table >.
    < th bgcolor = Color #FFFFFF = #000000 > GEO FLAG < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > DIC
    < th bgcolor = Color #FFFFFF = #000000 > < table > ONLY
    < th bgcolor = Color #FFFFFF = #000000 > ASG CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > QTY
    < th bgcolor = Color #FFFFFF = #000000 > PRICE UNIT < table >
    < th bgcolor = Color #FFFFFF = #000000 > DMD CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > PROJ CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > PRIORITY
    < th bgcolor = Color #FFFFFF = #000000 > < table > RDD
    < th bgcolor = Color #FFFFFF = #000000 > CLS OF < table > SUPPLY
    < th bgcolor = Color #FFFFFF = #000000 > ESTAB DTE < table >
    < th bgcolor = Color #FFFFFF = #000000 > FIRST BO DTE < table >
    < th bgcolor = Color #FFFFFF = #000000 > FIRST DTE CAN < table >
    < th bgcolor = Color #FFFFFF = #000000 > SUPADD < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > UI
    < th bgcolor = Color #FFFFFF = #000000 > LCA INST < table >
    < th bgcolor = Color #FFFFFF = #000000 > GIS CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > FD CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > MED STAT CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > SSF FLAG < table >
    < th bgcolor = Color #FFFFFF = #000000 > DTE UPDT < table >

    < b >
    < td align = "center" > $line2 [0] < table >
    < td align = "center" > $line2 [1] < table >
    < td align = "center" > $line2 [2] < table >
    < td align = "center" > $line2 [3] < table >
    < td align = "center" > $line2 [4] < table >
    < td align = "center" > $line2 [5] < table >
    < td align = "center" > $line2 [6] < table >
    < td align = "center" > $line2 [7] < table >
    < td align = "center" > $line2 [8] < table >
    < td align = "center" > $line2 [9] < table >
    < td align = "center" > $line2 [10] < table >
    < td align = "center" > $line2 [11] < table >
    < td align = "center" > $line2 [12] < table >
    < td align = "center" > $line2 [13] < table >
    < td align = "center" > $line2 [14] < table >
    < td align = "center" > $line2 [15] < table >
    < td align = "center" > $line2 [16] < table >
    < td align = "center" > $line2 [17] < table >
    < td align = "center" > $line2 [18] < table >
    < td align = "center" > $line2 [19] < table >
    < td align = "center" > $line2 [20] < table >
    < td align = "center" > $line2 [21] < table >
    < td align = "center" > $line2 [22] < table >


    < /tr >
    < /table > ';
    }
    for ($i = 2; $i < 3; $i ++)
    {
    $line2 = explode ("|", $orders [$i]);
    echo "< BR > < BR > < b > $line2 [0] < /b >."

    }

    echo "< table border = 1 bordercolor = #000000 cellpadding = 2 cellspacing = 0 >
    < TR > < th bgcolor = Color #FFFFFF = #000000 > < table > DON
    < th bgcolor = Color #FFFFFF = #000000 > PKG ID < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > ONLY
    < th bgcolor = Color #FFFFFF = #000000 > STATUS CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > STATUS DT < table >
    < th bgcolor = Color #FFFFFF = #000000 > SHIP DTE IS < table >
    < th bgcolor = Color #FFFFFF = #000000 > REL DT < table >
    < th bgcolor = Color #FFFFFF = #000000 > DT DEP SHIP < table >
    < th bgcolor = Color #FFFFFF = #000000 > RCPT DT < table >
    < th bgcolor = Color #FFFFFF = #000000 > DT MAINT RET RCPT < table >
    < th bgcolor = Color #FFFFFF = #000000 > DT IDT RCPT < table >
    < th bgcolor = Color #FFFFFF = #000000 > DT MRD < table >
    < th bgcolor = Color #FFFFFF = #000000 > SOS RIC < table >
    < th bgcolor = Color #FFFFFF = #000000 > PKG ONLY < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > QTY
    < th bgcolor = Color #FFFFFF = #000000 > DEPOSIT CIR < table >
    < th bgcolor = Color #FFFFFF = #000000 > SSF FLAG < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > UI
    < th bgcolor = Color #FFFFFF = #000000 > SFX CD < table >
    < th bgcolor = Color #FFFFFF = #000000 > DIRECT FILL < table >
    < th bgcolor = Color #FFFFFF = #000000 > < table > STCN
    < th bgcolor = Color #FFFFFF = #000000 > POWER CL < table >

    < th bgcolor = Color #FFFFFF = #000000 > DT SSAR < table >
    < th bgcolor = Color #FFFFFF = #000000 > DT MCEA < table >
    < th bgcolor = Color #FFFFFF = #000000 > DT LAT ME < table >
    ";
    for ($i = 3; $i < $number_of_orders; $i ++)
    {
    $line2 = explode ("|", $orders [$i]);

    ECHO '.
    < b >
    < td align = "center" > $line2 [0] < table >
    < td align = "center" > $line2 [1] < table >
    < td align = "center" > $line2 [2] < table >
    < td align = "center" > $line2 [3] < table >
    < td align = "center" > $line2 [4] < table >
    < td align = "center" > $line2 [5] < table >
    < td align = "center" > $line2 [6] < table >
    < td align = "center" > $line2 [7] < table >
    < td align = "center" > $line2 [8] < table >
    < td align = "center" > $line2 [9] < table >
    < td align = "center" > $line2 [10] < table >
    < td align = "center" > $line2 [11] < table >
    < td align = "center" > $line2 [12] < table >
    < td align = "center" > $line2 [13] < table >
    < td align = "center" > $line2 [14] < table >
    < td align = "center" > $line2 [15] < table >
    < td align = "center" > $line2 [16] < table >
    < td align = "center" > $line2 [17] < table >
    < td align = "center" > $line2 [18] < table >
    < td align = "center" > $line2 [19] < table >
    < td align = "center" > $line2 [20] < table >
    < td align = "center" > $line2 [21] < table >
    < td align = "center" > $line2 [22] < table >
    < td align = "center" > $line2 [23] < table >
    < td align = "center" > $line2 [24] < table >
    < /tr > ";
    }
    echo "< / table >";


    }

    Returns an array of rows dbms_output or false.
    function GetDbmsOutput ($con)
    {
    $res = false;
    $stid = doParse ($con, "BEGIN DBMS_OUTPUT. GET_LINE (: LN,: ST); END; ») ;
    If {($stid)
    If (doBind ($stid, ': LN ', $ln, 255 "") & &)
    doBind ($stid, ": ST", $st, "")) {}
    $res = array();
    While ($succ = {doExecute ($stid))}
    If ($st)
    break;
    [] $res = $ln;
    }
    If (! $succ)
    $res = false;
    }
    @OCIFreeStatement ($stid);
    }
    return ($res);
    }

    Parse
    function doParse ($con, $stmt)
    {
    $stid = @OCIParse ($con, $stmt);
    If (! $stid)
    PrintOCIError (@OCIError ($con));
    return ($stid);
    }

    Link
    function doBind ($stid, $bn, & $bv, $ln)
    {
    $s = @OCIBindByName ($stid, $bn, $bv, $ln);
    If (! $s)
    PrintOCIError (@OCIError ($stid));
    return ($s);
    }

    Run
    function doExecute ($stid)
    {
    $s = @OCIExecute ($stid);
    If (! $s)
    PrintOCIError (@OCIError ($stid));
    return ($s);
    }

    OIC display error
    function PrintOCIError ($err)
    {
    echo "< p > < b > error < /b >: < /p > < pre > \n"..htmlentities($err['message'])"< / pre > \n";
    }

    $con = @OCILogon ("username", "password", "Server");
    If (! $con) {}
    PrintOCIError (@OCIError ());
    Die();
    }
    Turn on serveroutput
    SetServerOutput ($con, true);

    Create the dbms_output
    $s = doParse ($con, "begin data_pull_views.x_doc_num_query('$don'); end; ») ;
    If ($s)
    doExecute ($s);
    OCILogoff ($con);

    The output display
    OCILogoff ($con);
    DisplayDbmsOutput ($con);

    PEOPLE WITH DISABILITIES END * /.

    ? >

    < / body >
    < / html >

    ===========================
    ===========================

    What I've learned so far PHP code somehow seizes the dbmd_output buffer and load it in a table before you display it on the screen. Fine. I can even take a stab at some ODBC in VBScript with ASP commands, but it almost seems like it is not yet possible. Just a stab here's to it in ASP which is not error, but also returns no data.

    < %
    Van Goethem = request ("don")
    If van Goethem = "" then
    Van Goethem = "asdf1234".
    End If

    Set gv_con = Server.CreateObject ("ADODB. Connection")
    gv_con. ConnectionString = "Data Source = dsource; User = username ID; Password = password; »
    gv_con. Open

    the value of cmd = Server.CreateObject ("ADODB.Command")
    cmd ActiveConnection in the Group gv_con

    cmd.CommandText = "begin data_pull_views.x_doc_num_query ('" & van goethem & "');" end; »
    cmd.CommandType = 1

    Set the param = cmd.createparameter ("OutPut" 200,4, 50)
    cmd. Parameters.Append param

    cmd. run

    Response.Write "strText =" & cmd ("OutPut") & "< BR BR > > <" "»
    % >

    So I obviously have no idea what I'm doing. Any help getting this race would be appreciated greately.

    Hello

    I don't know anything about PHP either, but a quick look at the code, it seems that the procedure is pretty much just "all wrong", and unfortunately now it is your task to continue the tradition rather than fix the stored procedure.

    The thing that makes me say that it is "all wrong", it's that he uses dbms_output to communicate data. DBMS_OUTPUT is not intended to be used to return the results of a procedure, or be used as a reporting tool; It's supposed to be used to add debugging for troubleshooting instructions. The right thing to do is to return the results of a procedure stored via a parameter, refcursors, etc.

    Anyway, as you can not change the procedure, the problem boils down to the buffer that was completed by telephone dbms_output.put_line obtaining using calls to dbms_outout.get_line and here is a simple example that shows how you can go about this using ADO and ODBC.

    It will be useful,
    Greg

    procedure
    =======

    create or replace procedure populate_dbms_buffer as
    begin
    dbms_output.put_line('foo');
    dbms_output.put_line('bar');
    dbms_output.put_line('baz');
    end;
    /
    

    VBScript
    ========

    Const adLongVarChar = 201
    Const adInteger = 3
    Const adParamOutput = &H0002
    
    set con = createobject("adodb.connection")
    con.open "dsn=orcl;uid=scott;pwd=tiger"
    set cmd = CreateObject("adodb.command")
    set cmd.ActiveConnection = con
    
    cmd.commandtext = "begin dbms_output.enable(32000);end;"
    cmd.execute
    
    cmd.CommandText = "begin populate_dbms_buffer(); end;"
    cmd.execute
    
    cmd.CommandText = "begin dbms_output.get_line(?,?);end;"
    Set prmv2 = cmd.CreateParameter("",adLongVarChar, adParamOutput, 32767,"")
    Set prmnum = cmd.CreateParameter("", adInteger,adParamOutput,,1)
    cmd.Parameters.Append prmv2
    cmd.Parameters.Append prmnum
    
    stillmore=0
    while (stillmore<>1)
    cmd.execute
    stillmore = prmnum.value
    if (stillmore<>1) then
      wscript.echo prmv2.value
    end if
    wend
    'cleanup ommitted
    
    wscript.echo "done"
    

    output
    =======

    C:\>odbcparams_dbmsgetline.vbs
    Microsoft (R) Windows Script Host Version 5.7
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    foo
    bar
    baz
    done
    
  • Need help: printing with HP DeskJet 3525 Photo has a light lines @ Inc.

    I have problem with the new printer,

    Can someone help me because I have just the new printer

    You can check the result of the printer? We can see light lines, but everyone can see and make it bad.

    What should I do? because only 1 day buy new printer and get problem.

    It is guaranteed for 2 years.

    already clean by software, this new catrige and still full.

    I tried 3 times to photo printing and get the same result.

    are all the HP printers like this when photo printer with good quailty? This photo is taken by Canon 600 d.

    Thank you.

    any suggestions can send me an email or just reply to this post.

    Thanks for any help for me.

    GBU

    Hey Samuel,.

    Generally, these lines are caused by the print settings.  If you have not selected in the printer preferences option when printing correct paper type, the unit will not use the right time for the cycles of the printhead on the entire page.  If the drytime is not correct, then the movement of the print head generates lines seen in this image.

    You have the full features software installed on your computer for this printer?

    What is the operating system of the computer you're using?

    For a print quality problems that I would recommend following the steps described in the document link below which will discuss with print settings that are appropriate for the job at hand.  I would advise using parameters such as: HP Photo Plus or the correct selection of the photo, correct paper size paper for work of the image and the best print quality.

    Troubleshooting print quality problems

    Hope this helps,

    Jason

  • Replication Volumes with SQL databases

    Hi all

    I'm looking to replicate our environment for DR purposes. Us run on VMWare and SQL Server running on multiple servers. I need to replicate the primary equallogic volumes to secondary equallogic. Is there a way to do this to get compatible application of volume replicas?

    Thank you

    Tom

    Hello, Tom...

    For volumes that are configured for asynchronous replication between two groups of Dell EqualLogic, you can use Dell EqualLogic Auto-Snapshot Manager Microsoft Edition to create consistent Copies with Smart Replica applications.

    Here is a useful document:

    en.Community.Dell.com/.../download.aspx

    Thank you

    Michael Pacheco

  • Need help in this SQL logic

    Hi all

    I need to create a report that shows the batch duration grouped by batch code.

    The logic is that it should show. We currently have BatchId, BatchStartTime, and BatchEndTime, stored in table batch_t.

    I need these BatchId group if their hours start and end times are overlapping each other as shown below.

    GroupIDBatchIdBatchStartTimeBatchEndTime
    11228 MARCH 13 10.03.24.000000000 AM28 MARCH 13 12.22.43.000000000 PM
    11328 MARCH 13 10.14.38.000000000 AM28 MARCH 13 11.11.03.000000000 AM
    21528 MARCH 13 02.19.32.000000000 PM28 MARCH 13 02.27.24.000000000 PM
    31628 MARCH 13 03.46.23.000000000 PM28 MARCH 13 03.55.07.000000000 PM
    41728 MARCH 13 03.55.23.000000000 PM28 MARCH 13 03.57.46.000000000 PM
    52028 MARCH 13 04.10.53.000000000 PM28 MARCH 13 04.11.30.000000000 PM
    51928 MARCH 13 04.02.54.000000000 PM28 MARCH 13 04.17.00.000000000 PM

    I'm able to find batches that overlap with the OVERLAPS operator, but I'm not able to group them as described above (see the first column).

    SQL> SELECT Dense_rank()
    
    2    over(
    
    3    ORDER BY To_char(batchstarttime, 'DD-MON-RR HH24')) grp,
    
    4    batchid,
    
    5    batchstarttime,
    
    6    batchendtime
    
    7 FROM batch_t
    
    8 /
    
    GRP BATCHID BATCHSTARTTIME BATCHENDTIME
    
    ---------- --------------------------------------- ------------------------------------------------- -------------------------------------------------
    
    1 12 28-MAR-13 10.03.24.000000 AM 28-MAR-13 12.22.43.000000 PM
    
    1 13 28-MAR-13 10.14.38.000000 AM 28-MAR-13 11.11.03.000000 AM
    
    2 15 28-MAR-13 02.19.32.000000 PM 28-MAR-13 02.27.24.000000 PM
    
    3 16 28-MAR-13 03.46.23.000000 PM 28-MAR-13 03.55.07.000000 PM
    
    3 17 28-MAR-13 03.55.23.000000 PM 28-MAR-13 03.57.46.000000 PM
    
    4 19 28-MAR-13 04.02.54.000000 PM 28-MAR-13 04.17.00.000000 PM
    
    4 20 28-MAR-13 04.10.53.000000 PM 28-MAR-13 04.11.30.000000 PM
    
    7 rows selected
    
  • Can someone help me with sql for this problem?

    I need to get data from last year from Date of January 1, 2012, the current date, that is June 27, 2013... Upper limit I have such as SYSDATE. Can someone help me how to get the start date of the last year?

    Similarly, it can be like that!

    SQL > select
    TO_CHAR (add_months (trunc (sysdate, 'YYYY'),-12), 'DD-MON-YYYY') 2 start_dt
    3 double;

    START_DT
    -----------
    JANUARY 1, 2012

Maybe you are looking for