pl/sql block, reading the reading of data from the table to a single point in time

I'm trying to figure out if several cursors in a PL/SQL block are executed inside a single Point in time, and so don't see no updates of paintings by other processes or procedures running at the same time.

The reason why I ask is I have a block of code as an initial extraction of data, with some Sanity Check before the code runs. However, if another procedure might modify the data between the two, then the mental health check is not valid. So I am essentially trying to know if there is consistency read in a PL/SQL, preventing updates to other processes to be seen.

Anyone who has an idea?
BR,
Chambaz

Google SET Transaction.

or

Follow this link

http://download-West.Oracle.com/docs/CD/B12037_01/server.101/b10759/statements_10005.htm

Kind regards
Prazy

Tags: Database

Similar Questions

  • extract data from a table to a text file

    I need to extract data from a table to a text file, I twist my output is the following...

    bash-3. $00 vi tap3roamercosts_20110915144318.txt
    lines of 'tap3roamercosts_20110915144318.txt' 393948, 23464348 characters
    ^ LAFGTD | N | 2011090203000001 | 13242514000064 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    755. 64. 70. 0093794428588 | 0093796234547 | 0 | S2 | E | 412200306902634 | 8. 1. 61500 | 16081 |
    | HW | Call to the Roamer. 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | LKA | N_I_Independent
    the time of day. Rate of Roamer SMST systems | AFGTD20110902030000010001013242514000064 |
    |||||||||||||||||||||

    AFGTD | N | 2011090203000001 | 13242612000044 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    853. 44. 70. 234. 0093793252818 | 0 | S2 | E | 412200303198150 | 8. 1. 61000 | 12403 | HW | -Ro
    bitter call | 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | N_I_Independent time of Da
    There | Rate of Roamer SMST systems | AFGTD20110902030000010001013242612000044 |
    ||||||||

    AFGTD | N | 2011090203000001 | 13242612000047 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    853. 47. 70. 234. 0093793252818 | 0 | S2 | E | 412200303198150 | 8. 1. 61000 | 12403 | HW | -Ro
    bitter call | 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | N_I_Independent time of Da
    There | Rate of Roamer SMST systems | AFGTD20110902030000010001013242612000047 |
    ||||||||
    .
    .
    .
    .
    .

    Please help me how to format my output each record in simple lines in oracle sqlplus. Here are the settings I used...

    TERMOUT OFF SET;
    SET ECHO OFF;
    SET LINESIZE 100000;
    THE VALUE OF NEWPAGE 0;
    SET SPACE 0;
    SET PAGESIZE 50000;
    SET FEEDBACK OFF;
    SET THE OFF POSITION;
    SET TRIMSPOOL
    SET THE TAB

    And what was wrong with the answers that you have on your previous thread?

    How to extract data in a text file

    Please do not ask the same question again. If there is a problem with the answers provided, then continue on the same thread that tell people what is the problem.

    Saying that, this is another possibility for you...

    As user sys:

    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    /
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /
    

    As myuser:

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      --
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    

    This allows the header line and the data to write into files separate if necessary.

    for example

    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    
    PL/SQL procedure successfully completed.
    

    Output.txt file contains:

    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
    

    The procedure allows for the header and the data to separate files if necessary. Just by specifying the file name "header" will put the header and the data in a single file.

    Adapt to the exit of styles and different types of data are needed.

  • Remove data from several tables

    I want to delete the data of all tables in this database which having device_id = "A1".
    How to do it. 2 questions heres
    (1) there are about 40 tables of the database and do not know what table contained the device_id field.
    (2) we have several such deviced_id should be deleted, for example device_id = 'A1', or device _id = "A2", "A3". can sql read this info from a table and the process?  Thank you

    Look at this example

    SQL> create table t1 (device_id varchar2(2));
    
    Table created.
    
    SQL> create table t3 (device_id varchar2(2));
    
    Table created.
    
    SQL> insert into t1 values('A1');
    
    1 row created.
    
    SQL> insert into t1 values('A');
    
    1 row created.
    
    SQL> insert into t3 values('A1');
    
    1 row created.
    
    SQL> insert into t3 values('B');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from t1;
    
    DE
    --
    A1
    A
    
    SQL> select * from t3;
    
    DE
    --
    A1
    B
    
    SQL> select table_name from all_tab_columns where column_name='DEVICE_ID';
    
    TABLE_NAME
    ------------------------------
    T1
    T3
    
    SQL> DECLARE
      2     CURSOR my_cur
      3     IS
      4        SELECT table_name
      5          FROM all_tab_columns
      6         WHERE column_name = 'DEVICE_ID';
      7  BEGIN
      8  FOR MY_REC IN MY_CUR LOOP
      9      --DBMS_OUTPUT.PUT_LINE('delete from '||my_rec.table_name||' where device_id=''A1''');
     10      EXECUTE IMMEDIATE 'DELETE FROM '||my_rec.table_name||' WHERE device_id=''A1''';
     11  END LOOP;
     12
     13  END;
     14  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from t1;
    
    DE
    --
    A
    
    SQL> select * from t3;
    
    DE
    --
    B
    
    SQL>
    

    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev a. (10g OCP)
    http://kamranagayev.WordPress.com

  • Migration of data from a table to another table

    have a table1 that includes the existing data in the format.

    ~@!%~X1~@!%~Y1 in three different coulmns

    creates a new empty table and the need to migrate the data above, which is present in 3 different columns in a column in the new table, as shown in the example below.

    table 1 existing data (| separator of columns for formatting)
    ------------------------------------------------------------------------------------------------------------------------------------
    ID name1 | Name2. Name3
    123 ~@!%~X1~@!%~Y1 | ~@!%~X2~@!%~Y2 | ~@!%~X3~@!%~Y3
    234 ~@!%~X4~@!%~Y4 | ~@!%~X5~@!%~Y5 | ~@!%~X6~@!%~Y6
    456 ~@!%~X7~@!%~Y7 | ~@!%~X8~@!%~Y8 |     ~@!%~X9~@!%~Y9


    Table 2, which will initially be empty and after migration, it should look as follows.

    ID name1
    ----------------------------------------------------------------------------------------------------------------------------
    123 ~@!%~X1~@!%~Y1 & & ~@!%~X2~@!%~Y2 & & ~@!%~X2~@!%~Y2
    234 ~@!%~X4~@!%~Y4 & & ~@!%~X5~@!%~Y5 & & ~@!%~X6~@!%~Y6
    456 ~@!%~X7~@!%~Y7 & & ~@!%~X7~@!%~Y7 & & ~@!%~X7~@!%~Y7

    as shown in the example above

    Name1 column has ~@!%~X1~@!%~Y1
    Column name2 has ~@!%~X2~@!%~Y2
    Name3 column has ~@!%~X3~@!%~Y3

    Once the data is migrating from table 1 for id - 123 looks like below, before joining data from 3 tables, I need apopend & & for each for the token I read of the tabl1 of name1 to end ii should be added "& &" also when I read the name2 I add "& &" at the end of the string before the concatination.

    Here's the sample that deals with data for id - 123 with & & (only & & other symbols are part of the data)

    ~@!%~X1~@!%~Y1 & & ~@!%~X2~@!%~Y2 & & ~@!%~X2~@!%~Y2

    need help in writing a note of migate

    Published by: [email protected] on April 2, 2010 15:42

    Hello

    You are looking for something like this

    CREATE TABLE table_new
    AS
       (SELECT id, name1 || '&&' || name2 || '&&' || name3 name1
        FROM table1);
    

    or if you have the table ready

    INSERT INTO table_new
       (SELECT id, name1 || '&&' || name2 || '&&' || name3 name1
        FROM table1);
    

    Thank you

    Alen

  • Inserting data from one table to another table

    Hello

    I have the following SQL where I am updating a table by adding new data from another table, but without success.

    INSERT INTO
    () TOP_PROSPECTS
    COMMON_ID
    DATE_ADDED
    REVIEW_RANK
    EVAL_DATE
    PM_ASSIGN
    WHY_NOTES)
    SELECT
    t.COMMON_ID
    t.DATE_ADDED
    t.REVIEW_RANK
    t.EVAL_DATE
    t.PM_ASSIGN
    t.WHY_NOTES
    Of
    TEMP_IVAN_MARY t
    WHERE
    COMMON_ID <>t.COMMON_ID

    Any suggestions?

    Thank you.

    Published by: user13822709 on August 14, 2012 09:14

    Published by: user13822709 on August 14, 2012 09:15

    Is that what you're trying to do with the insert. I think there may be a sign {noformat}<{noformat}{noformat}>{noformat} missing in the where clause. This site eat those, so you need to use the equivalent! = post here.

    If I'm wrong about the missing trader, then it looks like you want to insert rows in temp_ivan_mary that are not already in top_prospects. If Yes, then you need something like:

    insert into top_prospects
       (common_id, date_added, review_rank, eval_date, pm_assign,
        why_notes)
    select t.common_id, t.date_added, t.review_rank, t.eval_date,
           t.pm_assign, t.why_notes
    from temp_ivan_mary t
    where t.common_id not in (select common_id from top_prospects
                              where common_id is not null)
    

    Function index and data available volumnes etc. then a mergr can be more effective. Something like:

    merge into top_prospects p
       using (select common_id, date_added, review_rank, eval_date,
                     pm_assign, why_notes
              from temp_ivan_mary) t
       on (p.common_id = t.common_id)
       when not matched then
          insert (common_id, date_added, review_rank, eval_date, pm_assign,
                  why_notes)
          values (t.common_id, t.date_added, t.review_rank, t.eval_date,
                  t.pm_assign, t.why_notes)
    from temp_ivan_mary t
    

    John

  • How can I insert data from another table into a table containing a timestamp column

    How you insert data from another table in a table if the target table contains a timestamp column. I tried to set the default value of GETDATE() column in the target table, but it does not work.


    I use MS SQL

    Sorry, I managed to get around this by inserting null as the value

  • data from 3 tables with later dates

    Hello
    Need help with the PL/SQL code, I need to write a code that will get the data from 3 tables with the most recent date.

    For an individual ACT_CODE the output of the SQL query should display the data including the last dates back to 3 tables, if there is no
    Date of the table, it should show the remaining data (think that the left join will do here)

    Names of tables:
    Institution_UPDT aiu
    AC ASQ_CONTACT
    GR_AUTHORIZE gr

    All 3 tables have ACT_Code in common

    Column names

    INSTITUTION_UPDT IAU - IAU. ACT_CODE, AIU.project_id as proj, IAU. UPDT_TYPE_ID, IAU. User_id, IAU. UPDT_DATE

    ASQ_CONTACT ac - ac. ACT_CODE as contact_code, ac.project_id, ac.first_name, ac.middle_initial, ac.last_
    Name, AC.title, AC. Status, AC.status_date

    GR_AUTHORIZE gr - GR ACT_CODE as grad_code, gr.name, gr.title AS grad_title, gr.submit_date


    Are the names of the columns date
    AC.status_date,
    IAU. UPDT_DATE and
    Gr.submit_date

    Thanks to you all
    appreciate your help

    Jesh

    Hi, Ngoumba,

    If a given ACT_Code couldn't miss from any of the tables, then you will use better full outer joins, not a join left outer.

    Perhaps it would be more effective to make a UNION of the three tables, then rotate the results in three datecolumns.

    You can use the GROUP BY aggregation to get the last date for each ACT_Code in each table.
    If you need other columns in the row which is the last date, you can use the ROW_NUMBER analytic function, like this:

    SELECT  ACT_Code
    ,     updt_date
    ,     ROW_NUMBER () OVER ( PARTITION BY  ACT_Code
                              ORDER BY          updt_date     DESC
                      ) AS r_num
    FROM    institution_updt
    

    The lines with r_num = 1 are the most recent

    This is a technique of ot the UNION-PIVOT example:

    WITH     union_data     AS
    (
         SELECT    ACT_Code
         ,       MAX (updt_date)     AS last_date
         ,       1                  AS table_id
         FROM       institution_updt
         GROUP BY  ACT_Code
    UNION ALL
         SELECT    ACT_Code
         ,       MAX (status_date)     AS last_date
         ,       2                  AS table_id
         FROM       ASQ_Contact
         GROUP BY  ACT_Code
    UNION ALL
         SELECT    ACT_Code
         ,       MAX (submit_date)     AS last_date
         ,       3                  AS table_id
         FROM       GR_Authorize
         GROUP BY  ACT_Code
    )
    SELECT       ACT_Code
    ,       MAX (CASE WHEN table_id = 1 THEN last_date END)     AS aiu_updt_date
    ,       MAX (CASE WHEN table_id = 2 THEN last_date END)     AS ac_status_date
    ,       MAX (CASE WHEN table_id = 3 THEN last_date END)     AS gr_submit_date
    FROM       union_data
    GROUP BY  ACT_Code
    ORDER BY  ACT_Code
    ;
    

    Published by: Frank Kulash, on September 16, 2009 15:02
    Added UNION-pivot example

  • Extraction of data from two tables without discounting

    Hi friends,

    I have a problem I want to extract data from two tables without discount in the text field when I will enter any value in a text field, then the value of corressponding must come to textfield corressponding.

    for example. There are two table A and B.
    Table A has Colunm

    S_ID number;
    C_ID Varchar2 (30);
    VARCHAR2 (4) s;

    Second table B Colunm name

    S_ID number;
    What varchar (30);
    L_Name varchar (20);

    When I enter in a text field then the c_id 101 s_id, dry, first_name and last_name should come to corressponding text without refresh fields.

    How can I do that.

    Thank you
    Maury

    You can use Ajax and there are tons of good examples out there for this purpose;
    For example [http://apex.oracle.com/pls/otn/f?p=31517:236:1876567353842241]

  • How to implement the reading of data from a matte file on a cRIO?

    Hi all!

    I'm still not sure, it is plausible, but I'll ask rather before you begin complicating. So far, I found no useful information on reading in the data to a device of RT from a file (type of a simulation test - data is simulated).

    I have the MatLab plugin that allows the storage of data read a MAT file, which has a number of columns that represent the different signals and lines representing the samples at a time (depending on the time of the sample - sample every time has its own line of signal data).

    I have no idea how to implement this at cRIO.

    The idea is:

    I have some algorithms running on the controller of RIO in a timed loop. As the entries of these algorithms I need to access each of the values of columns in the row, which is the time of the sample (sort of a time series - without written actual times).

    I am fairly new to RT and LV development, so any help would be appreciated.

    Thank you

    Luka

    Dear Luka!

    I think the reading of all the samples in a single channel is exactly what you need here, because reading the files may take some time and is not deterministic, so it is best to read all the data in memory (or if this is not feasible due to problems of size, fairly large pieces may be sufficient). The table read can be provided and then in the loop simulating outings, something like this:

    I used here separate channels so it's more graphic, but you can build all the channels in a 2D array and array index corresponding to the samples fom 1 who. You can also use for loops with indexing as tunnels are setup and then you won't need the index functions and the number of iterations is also set automatically, but you have to take care of synchronization settings.

    Best regards:

    Andrew Valko

    National Instruments

  • Reading data from a Table by using the loop

    I have a dynamic array within the PDF form. I want to loop through the rows in the table and read the contents of the cell. I successfully get the number of rows in the table. But impossible to read the values in the cells. I put control TextField (txtName) editable in every cell and trying to read its value.

    screenshot is below.

    table_loop_error.jpg

    I use the code is:

     form1.Page1.Subform1.btnReadTable::click - (JavaScript, client)
    
    var rowCount = MyTable._Row1.count;
    app.alert("Row Count: " + rowCount);
    var i = 0;
    
    for(i=0 ; i<rowCount ; i++)
    {
        //app.alert(MyTable.Row1[i].txtName.rawValue); // NOT WORKING
        
        app.alert(MyTable.Row1.txtName.rawValue); // WORKING, But just giving the value for the first row.
    }
    

    Please tell me how can I get the value of each name in all ranks by making a loop.

    Thanks in advance.

    -

    Afonso

    Hi, Afonso,

    You must resolve the node for the particular case of i. The syntax is:

    xfa.resolveNode("MyTable.Row1[" + i  + "].txtName").rawValue;
    

    Here there is an example that will show you the loop in action:

    http://www.assuredynamics.com/index.php/category/portfolio/two-way-binding-in-tables/

    Hope that helps,

    Niall

    Ensure the dynamics

  • L50-A-19N satellite can not read audio data from multiple sources

    I can't read the audio data from multiple sources. It is very annoying when I have 2 youtube videos, playing, if I start playing something on the media player, there is no sound on media player, it's the same when I have 2 open media players and 1 youtube video playing, youtube video has no sound...
    It disappears when I plug my headphones...

    I already have all the latest drivers, the DTS driver was last updated was in 2014, his day of February of this year...






    25/02/14

    DTS Inc. Windows 8.1 - 64 Bit 1.01.2700

    I don't know if this has the feel, but I had his most recent DTS driver that I found, it is not my laptop model, but they all seem to be the same - v1.1.88.0
    I uninstalled the DTS software and still had the same problem, then it is irrelevant on its driver somehow...






    02/10/15

    Integrated Device Technology Inc. Windows 8.1 - 64 Bit 6.10.6491.0

    Audio driver IDT has more recent release date, but the version of the driver is the same as the 2013 one...
    Why the older drivers of toshiba releaseing as 'NEW '?

    2nd is my Advanced settings speakers, nothing has changed when I disabled "allow applications to take exclusive control of this device.

    Sorry but I don't understand your problem.
    I tested it on my machine and if I start the music on three different sources (YouTube, player, web radio) I can hear all together, but it makes no sense to listen to music from different sources.

    Or how do understand you?

  • Delay COM port, but it can read back data from MAX

    What short RX and RX directly, COM port can data from feedback on the test panel MAX, but still error display "time out What is the reason? Thank you.

    Hi Colin,

    When you read back the data, there is a parameter called "Bytes read" you need key, the default value is 1024, in this case, it will keep waiting for 1024 bytes until the timeout occur.

    I found a good article talk to this topic and you can change the bytes to be read in the test environment LabVIEW or MAX.

    http://digital.NI.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0

    Let me know once try you it, thank you.

    Kind regards

    KwokHow

    AE OR Singapore

  • How to read in data from MySQL to Authorware?

    Hello

    I'm reading in my authorware (MySQL) database values, but the best I can do is either true or false.
    I would like to be able to get data from the database and return to AW as a string. Does anyone have experience with this? If anyone can lend a hand in this company?

    Thanks in advance for your help,

    Brad

    You'll need some sort of middleware of script, such as PHP or your ASP.
    script will need to:

    * connect to the database
    * query the database
    print the query results

    I use ReadURL to send variables AW to my PHP script, script recovers
    These values and assigns the variables used in the query. Print
    results are returned to the ReadURL. You can also use PostURL.

    In AW, my code for retrieving information from the database looks like this:

    ==================
    Action: = '? action = getData.
    query: = '& student_data_id =' ^ student_data_id
    URLString: = db_loc ^ 'retrieve_data.php' ^ action ^ query
    queryString: = ReadURL (URLString)
    ==================

    I Specifies an action so that the script can contain code for more than one
    the purpose of the trip. My PHP script looks now like the return line (the spirit):

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

    include a script not cached
    include (' lib/no_cache.php');

    connect to the database
    require_once ($_SERVER ['DOCUMENT_ROOT'].)
    '/.. (/ php_secure_scripts/check21/mysql_connect.php');

    create empty var for the holding of output to send to the Authorware
    $output = NULL;

    define queries
    If ((isset($_GET['action'])) & ($_GET ['action'] == 'login')) {/ / set}
    connection request
    $salt = get_salt();
    $query = "SELECT student_id, first_name, last_name, INST_ID select OF.
    students WHERE username = ' {$_GET ['username']} "AND
    password = ENCODE ("{$_GET ['password']}', '$salt'");

    } else if ((isset($_GET['action'])) & ($_GET ['action'] == 'getUserInfo'))
    {/ / set getUserInfo}
    $query = "SELECT inst_name, e-mail, student_data_id, active COURSES."
    LEFT JOIN students student_data USING (course_id) LEFT JOIN to HELP
    (student_id) Using (select INST_ID) WHERE LEFT JOIN institutions
    students.student_id = {$_GET ['sid']} AND courses.sku = {$_GET ['SKU']} ";

    } else if ((isset($_GET['action'])) & ($_GET ['action'] == 'getData')) {}
    query Set getData
    $query = "SELECT course_data, quality, increased FROM student_data WHERE."
    student_data_id = {$_GET ['student_data_id']} ";

    } else {}
    Exit();
    ECHO '.

    No selected query.

    ";
    }

    query the database
    $result = @mysql_query ($query);

    $row = mysql_fetch_array ($result, MYSQL_ASSOC);

    foreach ($row as $key-online $value) {}
    $output = $output. "&" . $key. "=" . $value;
    }

    print $output;

    Close the database
    mysql_close();
    ?>
    ==================

    The returned data is saved in my AW variable called 'queryString' which
    I then analyze in AW. My database connection code is kept in a separate script
    in a location on the server that is not available for browsers. The script
    also contains a custom function that returns a "germ" for the password
    encoding.

    If you need a good book to learn PHP & MySQL, I recommend 'PHP and MySQL '.
    for dynamic Web Sites"by Larry Ullman.
    http://www.Amazon.com/GP/product/0321336577/SR=1-1/QID=1144427020/ref=pd_bbs_1/103-2954060-1860665? % 5Fencoding = UTF8 & s = books

    I hope this gets you on your way!

    --
    _______________________

    Paul Swanson
    Portland, Oregon, United States
    _______________________

    "bradsteele" wrote in message
    News:e161n1$o76$1@forums. Macromedia.com...
    > Hi,.
    >
    > I'm reading in my authorware (MySQL) database values, but
    the
    > I am able to get better is true or false.
    > I would like to be able to get data from the database and return
    for AW

    > string. Does anyone have experience with this? If anyone can lend
    one
    > hand in this company?
    >
    > Thank you in advance for your help.
    >
    > Brad
    >

  • pl/sql block returning the sql query.

    Hello

    I'm using the apex version 3.2 oracle 10g.
    I use the following return statement inside my report, which is a pl/sql block sql query return.

    declare
    The NEST varchar2 (100);
    Start
    ......
    return "select patient_id_code from t_files_data_exp, including patient_id_code not in the NEST';"

    end;

    How am I suppose to mention the pid within the return stmt I mean with quotes or anything? because the above return stmt gives error
    "1 error has occurred."
    Query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the generic "columns" box below the source of the region without analysis. The query cannot be parsed, the cursor is not yet open or a function returning a SQL query returned no value. »


    Thank you

    If is varchar2

    declare
    pid varchar2(100) := '(''61092'',''61093'')';
    ...
    
  • Reading data from several tables on Apex

    Hi all

    My apologies if the below question has been answered already, just that I couldn't find the relevant discussion.

    I have an interactive report I want to use to display data in 2 tables:

    Table 1 about 10 columns but I want to just see 3 columns, Field1 and Field2 field3.

    Table 2 has about 5 columns and I want only showing 2 of these columns (Column1 and Column2) on the same report with columns in table 1 above.

    I need my report to look like this: field1, Field2 field3 Column1 Column2

    FROM table1, table2

    I tried the example above and it seems to not work, can I please get assistance on how to achieve this.

    Thanks in advance.

    Hello

    Thanks for your reply, I actually found and answer the question.

    I wanted to display the data in 2 tables (views) distinct have no joints, and so therefore I couldn't join them with a join condition.

    What I did was created a dummy field on the two tables with similar values attached tables using these dummy fields and it works perfectly.

    Thank you.

Maybe you are looking for

  • Problems of sort by composer

    I am running iTunes 12 but have had this problem since the 11. My library is having a hard time to sort my classical music of the composer. Until about H in the alphabet, everything is perfect. However, after I start to see things like this: This mus

  • Qosmio G30: How to manage QosmioPlayer record zone?

    I have Toshiba Qosmio G30 I want to know; How can I manage the save box in qosmioplayer?I have only 4 GB bul l want to maxmize it.

  • Dynamic front

    HelloI'm working on a VI that will be used to control a number of cars and RC Quadcopters.VI Gets the amount of tools tracking vehicles, then executes a loop and learn for each vehicle if a quad or a car.Now that this step is completed, I want the fr

  • What is this and how can I get rid of it: akhzpnwvld

    When I open Internet Explorer or any program depends on this appears on my desktop and the Documents and Settings folder and the Local Settings/Temp folder. It interferes with my research on the internet Google. What is this and how do I get rid of h

  • NFC allows to open my application?

    HelloI'm new on using NFC.I have so much to read a label and to write to a tag (learned the post official supportforums.blackberry on NFC)... However this is question is "how to open my application when the NFC is triggered.say that I write the follo