Multiple language data in the same table and indexes

We have 8.1.5 database with
NLS_LANGUAGE=ENGLISH and NLS_TERRITORY=UNITED KINGDOM set at the database level. We also set the NLS_LANG appropriately when we index the data. We also use the preference setting BASE_LETTER=YES when indexing.
Our tables contain book titles which is what we index using interMedia. Being an online book store, this table may contain titles in English (most of the titles are in English being UK) and some titles in French. Please note the French language has accents and diacritics. Normally in a French database with NLS parameters set correctly and BASE_LETTER=YES, if we search for a title with accent / diacritic it will return the record correctly and match the rows with or without the accents (e.g. searching for video will return both vidio (not the accent on e) and video). However, with the UK settings the accents are not ignored during indexing and it only returns the records that exactly match the search word (e.g. searching for video returns only video and searching for vidio returns only vidio (note the accents on e in the last two videos)).
Question: Is there any way to appropriately index multiple language specific titles in the same database? If yes, how? Is it possible at all? Suggestions, ideas are welcome.
null

Similar request; if there are several different languages used in a database, but a search word can be typed in by anyone and not necessarily in the default language, I still want to be able to pick up all the records (including text in blobs) in any language where my search word = the equivelant word in the other languages; eg. searching on "tree", the search would bring back a document that contained "l'arbre". I then want to set the default language, and allow the user to select a "search in these languages" option to expand the search from the default "tree" to all languages in the database.
I know about the multi_Lexer but does it extend functionality to this level?

Similar Messages

  • Query - Get data from the same table and field two times on a single line

    I have prepared a query showing the bill of material. At each line each component will be a new line and I want to have the description of the material at the top (the master material composed of the component ones) and also the description of the component materials on the same line. This means that I should be able to use MAKT table 2 times on a single line of the query. I have used the query tool with SQ01 and SQ02 tcodes. How can I get the the description of the material at the top and also the description of the component material on a single line?
    Thanks in advance for the answers.

    Yasar,
    Any time you wish to use a table twice in an SQ01 query, you have to create an alias.
    SQ02 > select the infoset, 'change' > go to Join definitions.
    Select 'Alias' button.  Create. Select your table name (such as MAKT) and define an alias, such as 'COMP_MAKT' for component descriptions.
    Now you can insert the Alias table into your infoset just like it was a regular table, and use standard join method to join COMP_MAKT to your component material number.
    Best regards,
    DB49

  • Several dates in the same field and table

    Hey!
    I need dates of different work phases, in order to calculate the duration of each phase separately in SAP-Query. The dates are situated in the same tables and fields (f.ex. actual start dates of work phase 1, phase 2, phase 3, etc. are all located in table AFVV and field ISDD). But I need them separately. So is the only option to create separate fields for the dates of each work phase?
    Maria

    Hi
    SDN is itself a one-point source for anything related to SAP. (You can check eLearning etc for the same)
    But still, here is one for you to start learning ABAP [http://abap-gallery.blogspot.com/2007/07/step-by-step-learning-abap.html|http://abap-gallery.blogspot.com/2007/07/step-by-step-learning-abap.html]
    Regards
    Raj

  • How can I do to acquire and save date in the same time and in the same file when I run continual my VI without interrupti​on.

    I've attached a VI that I am using to acquire amplitude from Spectrum analyzerse. I tried to connect amplitude ouput to the VI Write Characters To File.vi and Write to Spreadsheet File.vi. Unfortunately when I run continual this VI without interruption, labview ask me many time to enter a new file name to save a new value.
    So, How can I do to aquire and save date in the same time and in the same file when I run continual my VI for example during 10 min.
    Thank you in advance.
    Regards,
    Attachments:
    HP8563E_Query_Amplitude.vi ‏37 KB

    Hi,
    Your VI does work perfectly. Unfortunately this not what I want to do. I've made error in my last comment. I am so sorry for this.
    So I explain to you again what I want to do exactly. I want to acquire amplitude along road by my vehicle. I want to use wheel signal coming from vehicle to measure distance along road. Then I acquire 1 amplitude each 60 inches from spectrum analyzer.
    I acquire from PC parallel port a coded wheel signal coming from vehicle (each period of the signal corresponds to 12 Inches). Figure attached shows the numeric signal coming from vehicle, and the corresponding values “120” and “88” that I can read from In Port vi.
    So I want to acquire 1 time amplitude from spectrum analyser each 5
    period of the signal that I am acquiring from parallel port.
    So fist I have to find how can I count the number of period from reading the values “120” and “88” that I am acquiring from In Port (I don’t know the way to count a number of period from reading values “120” and “88”).
    Here is a new algorithm.
    1) i=0 (counter: number of period)
    2) I read value from In Port
    3) If I acquire a period
    i= i+1 (another period)
    4) If i is multiple of 5 (If I read 5 period)
    acquire 1 time amplitude and write to the same
    file this amplitude and the corresponding distance
    Distance = 12*i). Remember each period of signal
    Corresponds to 12 Inches).i has to take these
    values: 5,10,15,20,25,35,40,45,50,55,60............
    5) Back to 2 if not stop.
    Thank you very much for helping me.
    Regards,
    Attachments:
    Acquire_Amplitude_00.vi ‏59 KB
    Figure_Algorithm.doc ‏26 KB

  • How to update a table (CUSTOMER) on a Report Server with the data from the same table (CUSTOMER) from another server Transaction server?

    I had an interview question that is:
    How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) From another server ex: Transaction server?
    Set up steps so inset, update or delete operation takes place across the servers.
    It would be great if someone please enlighten me in details about this process in MS SQL Server 2008 R2.
    Also please describe would it be different for SQL Server 2012?
    If so, then what are the steps?

    I had an interview question that is:
    How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) from another server ex: Transaction server?
    Set up steps so that inset, update or delete operation gets done correctly across servers.
    I was not sure about the answer, it would be great if someone please put some light on this and explain in details about this process in MS SQL Server 2008 R2.
    Also it would be very helpful if you please describe would it be different for SQL Server 2012? If so, then what are the steps?

  • How to display data with the same text and key in the drop down list?

    Hi All,
    Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    REPORT ZTESTING.
    TYPE-POOLS: VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST,
          c(20) type c.
    *      c = 'select any'.
    data:begin of itab occurs 0,
          kunnr like kna1-kunnr,
          name1 like kna1-name1,
         end of itab.
    data:begin of jtab occurs 0,
          kunnr like kna1-kunnr,
          land1 like kna1-land1,
         end of jtab.
    PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
                              default 'SELECT'.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'p_list'.
    VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    APPEND VALUE TO LIST.
    VALUE-KEY = '2'.
    VALUE-TEXT = 'Country'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    start-of-selection.
    select kunnr name1 up to 20 rows from kna1 into table itab.
    select kunnr land1 up to 20 rows from kna1 into table jtab.
    case p_list.
    when '1'.
    loop at itab.
    write:/ itab-kunnr,itab-name1.
    endloop.
    when '2'.
    loop at jtab.
    write:/ jtab-kunnr,jtab-land1.
    endloop.
    endcase.
    <Added code tags>
    Moderator Message: Please use the "code" tags to format your code snippet.
    Edited by: Suhas Saha on Nov 17, 2011 11:19 AM

    shawnTan wrote:
    Hi All,
    >
    > Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
    >
    >
    REPORT ZTESTING.
    >
    > TYPE-POOLS: VRM.
    >
    > DATA: NAME  TYPE VRM_ID,
    >       LIST  TYPE VRM_VALUES,
    >       VALUE LIKE LINE OF LIST,
    >       c(20) type c.
    >
    > *      c = 'select any'.
    >
    > data:begin of itab occurs 0,
    >       kunnr like kna1-kunnr,
    >       name1 like kna1-name1,
    >      end of itab.
    >
    > data:begin of jtab occurs 0,
    >       kunnr like kna1-kunnr,
    >       land1 like kna1-land1,
    >      end of jtab.
    >
    > PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
    >                           default 'SELECT'.
    >
    > AT SELECTION-SCREEN OUTPUT.
    >
    > NAME = 'p_list'.
    >
    > VALUE-KEY = 'Name'.     "---> Data for key is the same with text
    > VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
    > APPEND VALUE TO LIST.
    >
    > VALUE-KEY = '2'.
    > VALUE-TEXT = 'Country'.
    > APPEND VALUE TO LIST.
    >
    > CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    >
    > start-of-selection.
    > select kunnr name1 up to 20 rows from kna1 into table itab.
    > select kunnr land1 up to 20 rows from kna1 into table jtab.
    >
    > case p_list.
    > when '1'.
    > loop at itab.
    > write:/ itab-kunnr,itab-name1.
    > endloop.
    >
    > when '2'.
    > loop at jtab.
    > write:/ jtab-kunnr,jtab-land1.
    > endloop.
    > endcase.
    >
    > <Added code tags>
    >
    > Moderator Message: Please use the "code" tags to format your code snippet.
    >
    > Edited by: Suhas Saha on Nov 17, 2011 11:19 AM
    This surely seems to be a bug to me(if not by design),  did you check for any SAP notes? Perhaps a front end trace can help(Note 407743) !
    -Rajesh.

  • Nsert/Update and Add Column at the same Table and at the "same" Time

    Hello,
    I want Insert/Update and Add Column at the same Table and at the "same" Time but in different sessions.
    Example:
    At first the "insert/update" statement:
    Insert into TestTable (Testid,Value) values (1,5105);
    After that the "add" statement:
    Alter table TestTable add TestColumn number;
    - sadly now I get the message: ORA-00054: resource busy and acquire with NOWAIT specified
    "insert/update" statement:
    Insert into TestTable (Testid,Value) values (2,1135);
    After that the execute commit.
    I don't know when the first session set the commit statement so I want that the DB the "Alter Table..." statement execute if it's possible.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.
    Thanks for ideas

    Well I want to walk in the rain without and umbrella and still stay dry, but it ain't gonna happen.
    You can't run a DDL statement against a table with transactions pending. Session 2 has to wait until session commits or rollbacks (or until the session is killed). That's just the way it is.
    This makes sense if you think about it. The data dictionary has to be consistent across all sessions. If session 2 was allowed to change the table structure whilst session 1 has a pending transaction then the database is in an inconsistent state. This is easier to see if you consider the reverse situation - the ALTER TABLE statement run by session 2 does a DROP COLUMN TESTID rather than adding a column: now what should happen to session 1's INSERT statement? You have retrospectively invalidated a statement that was perfectly legal when it was executed.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.Fnord.
    Cheers, APC

  • How to populate data in the same table based on different links/buttons

    Hi
    I'm using jdeveloper 11.1.4. I have a use case in which i need to populate data in the same table based on click of different links.
    Can anyone please suggest how can this be achieved.
    Thanks

    I have a use case in which i need to populate data in the same table based on click of different linksDo you mean that you need to edit existing rows ?
    What format do you have the date in - table / form ?

  • Two triggers in the same table and event

    If I created two triggers on the same table and event (before insert), which of them will be triggered first ?...
    The problem from the beginning is that I created the second one as after insert and in the body of the trigger I wrote (:new.xxx:= value) ... then an error (that it should be before insert trigger or update trigger), so I created it as before update ,,, but I have already before update trigger (for primary key)..... and the problem -I think- which of them start first...
    Can make the second one as after insert and make update statement instead of assigning (:new.xxx:= value).....
    Regards

    If I created two triggers on the same table and event
    (before insert), which of them will be triggered
    first ?...As already mentioned, prior to 11g the order of firing is undetermined.
    The problem from the beginning is that I created the
    second one as after insert and in the body of the
    trigger I wrote (:new.xxx:= value) ... then an error
    (that it should be before insert trigger or update
    trigger), so I created it as before update ,,, but I
    have already before update trigger (for primary
    key)..... and the problem -I think- which of them
    start first...If there is a conflict of interest inside the code then you will have to alter your design principle around this to cater for it. Also consider combining the code into a single before insert trigger to prevent any confusion.
    Can make the second one as after insert and make
    update statement instead of assigning (:new.xxx:=
    value).....Attempting to update or query the same table as is causing the trigger to fire will result in a mutating table error. You can't do this.

  • Historical and transaction data in the same tables creates perf problems

    Our Oracle based application is slow partly due to the fact that historical data are kept in the same table as transactional data. For example records about deceased patients, patients treated 5 years ago...etc, are kept in the one and only one patient table, which is needed to run the daily process of the hospital. So gradually all our major tables PATIENTS, CHARTS, NAMES, APPOINTMENTS have grown very large and since most of our SQL join all these tables at the same time, then all screens and reports run very slowly. I have introduced the idea that we should split all these tables in two: historical PATIENTS data, and CURRENT PATIENTS data...the same with all the others. A nice system would first search in the smaller transactional tables, which would run faster being smaller, and if no data found, then fallback to the historical tables. But this would require programming. From what I have read mateialized view could solve part of our problem. We could have views containing for example only one year worth of the data, and I guess any changes could be later replicated in the base table. What I dont know is what to do if we cannot find the patient in the matealized views ? Do I need to fallback to another SQL which will search in the initial base tables ? Anyway we can implement this without programming ? Tx.

    Appointment table: 207,470
    Visit table: 5,890,920
    Patient table: 2,993,129
    Chart table: 2,864,069
    Patient names table: 3,938,118
    SELECT
        APPOI_OR_VISIT,
        VISIT_SEQ,
        PAT_SEQ,
        INST_CODE,
        INST_CODE_DISPL,
        INST_DESC,
        CLINIC_CODE,
        CLINIC_CODE_DISPL,
        CLINIC_DESC,
        SPEC_CODE,
        SPEC_CODE_DISPL,
        SPEC_DESC,
        VISIT_DATE,
        VISIT_TIME,
        VISIT_TIME_ARRIVAL,
        APPTYPE_CODE,
        SESSION_DOM_MODE,
        PRESTYPE_CODE,
        PRESTYPE_DOM_TYPE,
        DIA_CODE,
        VISIT_TIME_START_RESP,
        VISIT_TIME_DISCHARGE,
        APPOI_NB_DURATION,
        VISIT_TX_REASON,
        VISIT_TX_COMMENT,
        EXTDOC_CODE,
        VISIT_PN_REFPHYS_NAME,
        PATYPE_CODE,
        PAYRESP_CODE,
        VISIT_IND_GROUP,
        VISIT_PCODE,
        VISIT_IND_COMPLETE,
        VISIT_IND_ADMISSION,
        VISIT_IND_CONFIDENTIALITY,
        VISIT_DATE_ACCIDENT,
        APPOI_SEQ,
        BILLING_CODE,
        VISIT_TX_DIAGNOSIS,
        CST_CODE_1,
        CST_CODE_2,
        CST_CODE_3,
        APPOI_DH_CRE,
        APPOI_CODE_CRE_USER,
        APPOI_DH_MOD,
        APPOI_CODE_MOD_USER,
        VISIT_CODE_CRE_USER,
        VISIT_DH_CRE,
        VISIT_UPDATED_COUNT,
        VISIT_CODE_MOD_USER,
        VISIT_DH_MOD,
        APPOI_PAYRESP_CODE,
        APPOI_DT_ACCIDENT,
        PATIENT_LAST_NAME,
        PATIENT_FIRST_NAME,
        PATIENT_CONFIDENTIALITY,
        PATIENT_CHART_EXT,
        TO_NUMBER(SUBSTR(PATIENT_CHART_EXT, 1, INSTR(PATIENT_CHART_EXT, '|')-1)) AS PATIENT_CHART_NO,
        PAT_IND_SPECIAL_RISK
    FROM
        SELECT
            'VISIT'              AS APPOI_OR_VISIT,
            VISIT.VISIT_SEQ,
            VISIT.PAT_SEQ,
            INSTITUTION.INST_CODE,
            INSTITUTION.INST_CODE_DISPL,
            INSTITUTION.INST_DESC,
            CLINIC.CLINIC_CODE,
            CLINIC.CLINIC_CODE_DISPL,
            CLINIC.CLINIC_DESC,
            SPECIALTY.SPEC_CODE,
            SPECIALTY.SPEC_CODE_DISPL,
            SPECIALTY.SPEC_DESC,
            VISIT.VISIT_DATE,
            VISIT.VISIT_TIME,
            VISIT.VISIT_TIME_ARRIVAL,
            VISIT.APPTYPE_CODE,
            VISIT.SESSION_DOM_MODE,
            VISIT.PRESTYPE_CODE,
            VISIT.PRESTYPE_DOM_TYPE,
            VISIT.DIA_CODE,
            VISIT.VISIT_TIME_START_RESP,
            VISIT.VISIT_TIME_DISCHARGE,
            VISIT.APPOI_NB_DURATION,
            VISIT.VISIT_TX_REASON,
            VISIT.VISIT_TX_COMMENT,
            VISIT.EXTDOC_CODE,
            VISIT.VISIT_PN_REFPHYS_NAME,
            VISIT.PATYPE_CODE,
            VISIT.PAYRESP_CODE,
            VISIT.VISIT_IND_GROUP,
            VISIT.VISIT_PCODE,
            VISIT.VISIT_IND_COMPLETE,
            VISIT.VISIT_IND_ADMISSION,
            VISIT.VISIT_IND_CONFIDENTIALITY,
            VISIT.VISIT_DATE_ACCIDENT,
            VISIT.APPOI_SEQ,
            VISIT.BILLING_CODE,
            VISIT.VISIT_TX_DIAGNOSIS,
            VISIT.CST_CODE_1,
            VISIT.CST_CODE_2,
            VISIT.CST_CODE_3,
            VISIT.APPOI_DH_CRE,
            VISIT.APPOI_CODE_CRE_USER,
            VISIT.APPOI_DH_MOD,
            VISIT.APPOI_CODE_MOD_USER,
            VISIT.VISIT_CODE_CRE_USER,
            VISIT.VISIT_DH_CRE,
            VISIT.VISIT_UPDATED_COUNT,
            VISIT.VISIT_CODE_MOD_USER,
            VISIT.VISIT_DH_MOD,
            NULL AS APPOI_PAYRESP_CODE,
            TO_DATE(NULL) AS APPOI_DT_ACCIDENT,
            NAME.NAM_PN_NAM AS PATIENT_LAST_NAME,
            NAME.NAM_PN_FNAM AS PATIENT_FIRST_NAME,
            CONFIDENTIALITY.CONF_DESC AS PATIENT_CONFIDENTIALITY,
            PI_SECURITY.F_GET_CHART_NUMBER_SCAN_CODE(VISIT.PAT_SEQ, 103 /*:pChartInstitutionID*/, 0) AS PATIENT_CHART_EXT,
            PATIENT.PAT_IND_SPECIAL_RISK
        FROM
                   AS_T_VISITS        VISIT,
                   CT_R_INSTITUTIONS  INSTITUTION,
                   AS_T_CLINICS       CLINIC,
                   CT_R_SPECIALITIES  SPECIALTY,
                   PI_T_NAMES         NAME,
                   PI_T_PATIENTS      PATIENT,
                   PI_R_CONF_LEVELS   CONFIDENTIALITY
        WHERE
            VISIT_DATE >= TO_DATE('2004-04-01', 'YYYY-MM-DD') /*:P_VISIT_DATE_FROM*/ AND
            VISIT_DATE <= TO_DATE('2004-04-02', 'YYYY-MM-DD') /*::P_VISIT_DATE_TO*/ AND
            CLINIC.CLINIC_CODE = VISIT.CLINIC_CODE AND
            SPECIALTY.SPEC_CODE = CLINIC.SPEC_CODE AND
            INSTITUTION.INST_CODE(+) = VISIT.INST_CODE AND
            NAME.PAT_SEQ = VISIT.PAT_SEQ AND
            NAME.NAMTYP_CODE = 1 AND
            PATIENT.PAT_SEQ = VISIT.PAT_SEQ AND
            CONFIDENTIALITY.CONF_CODE (+) = PATIENT.CONF_CODE
        UNION
        SELECT
            'APPOI'                                                                                                                                                                                                        AS APPOI_OR_VISIT,
            0                                                                                                                                                                                                                            AS VISIT_SEQ,
            NVL(APPOINTMENT_GROUP.PAT_SEQ, APPOINTMENT.PAT_SEQ) AS PAT_SEQ,
            INSTITUTION.INST_CODE,
            INSTITUTION.INST_CODE_DISPL,
            INSTITUTION.INST_DESC,
            CLINIC.CLINIC_CODE,
            CLINIC.CLINIC_CODE_DISPL,
            CLINIC.CLINIC_DESC,
            SPECIALTY.SPEC_CODE,
            SPECIALTY.SPEC_CODE_DISPL,
            SPECIALTY.SPEC_DESC,
            APPOINTMENT.SESSION_DATE                                                                                                                                                                AS VISIT_DATE,
            APPOINTMENT.APPOI_TIME                                                                                                                                                                     AS VISIT_TIME,
            ''                                                                                                                                                                                                                  AS VISIT_TIME_ARRIVAL,
            APPOINTMENT.APPTYPE_CODE,
            APPOINTMENT.SESSION_DOM_MODE,
            0                                                                                                                                                                                                                            AS PRESTYPE_CODE,
            ''                                                                                                                                                                                                                  AS PRESTYPE_DOM_TYPE,
            0                                                                                                                                                                                                                            AS DIA_CODE,
            ''                                                                                                                                                                                                                  AS VISIT_TIME_START_RESP,
            ''                                                                                                                                                                                                                  AS VISIT_TIME_DISCHARGE,
            APPOINTMENT.APPOI_NB_DURATION,
            APPOINTMENT.APPOI_TX_REASON                                                                                                                                                           AS VISIT_TX_REASON,
            APPOINTMENT.APPOI_TX_COMMENT                                                                                                                                                      AS VISIT_TX_COMMENT,
            APPOINTMENT.EXTDOC_CODE,
            APPOINTMENT.APPOI_PN_REFPHYS_NAME                                                                                                                                            AS VISIT_PN_REFPHYS_NAME,
            APPOINTMENT_TYPE.PATYPE_CODE  AS PATYPE_CODE,
            0                                                                                                                                                                                                                            AS PAYRESP_CODE,
            DECODE(APPOINTMENT_GROUP.PAT_SEQ,NULL,0,1)                                                                                                                   AS VISIT_IND_GROUP,
            ''                                                                                                                                                                                                                  AS VISIT_PCODE,
            0                                                                                                                                                                                                                            AS VISIT_IND_COMPLETE,
            0                                                                                                                                                                                                                            AS VISIT_IND_ADMISSION,
            APPOINTMENT.APPOI_IND_CONFIDENTIALITY                                                                                                                                  AS VISIT_IND_CONFIDENTIALITY,
            TO_DATE(NULL)                                                                                                                                                                                          AS VISIT_DATE_ACCIDENT,
            APPOINTMENT.APPOI_SEQ,
            0                                                                                                                                                                                                                            AS BILLING_CODE,
            ''                                                                                                                                                                                                                  AS VISIT_TX_DIAGNOSIS,
            0                                                                                                                                                                                                                            AS CST_CODE_1,
            0                                                                                                                                                                                                                            AS CST_CODE_2,
            0                                                                                                                                                                                                                            AS CST_CODE_3,
            APPOINTMENT.APPOI_DH_CRE                                                                                                                                                                AS APPOI_DH_CRE,
            APPOINTMENT.APPOI_CODE_CRE_USER                                                                                                                                                 AS APPOI_CODE_CRE_USER,
            APPOINTMENT.APPOI_DH_MOD                                                                                                                                                                AS APPOI_DH_MOD,
            APPOINTMENT.APPOI_CODE_MOD_USER                                                                                                                                                 AS APPOI_CODE_MOD_USER,
            ''                                                                                                                                                                                                                  AS VISIT_CODE_CRE_USER,
            SYSDATE                                                                                                                                                                                                             AS VISIT_DH_CRE,
            0                                                                                                                                                                                                                            AS VISIT_UPDATED_COUNT,
            ''                                                                                                                                                                                                                  AS VISIT_CODE_MOD_USER,
            SYSDATE                                                                                                                                                                                                             AS VISIT_DH_MOD,
            PAYRESP_CODE                                                                             AS APPOI_PAYRESP_CODE,
            APPOI_DT_ACCIDENT,
            NAME.NAM_PN_NAM AS PATIENT_LAST_NAME,
            NAME.NAM_PN_FNAM AS PATIENT_FIRST_NAME,
            CONFIDENTIALITY.CONF_DESC AS PATIENT_CONFIDENTIALITY,
                                        PI_SECURITY.F_GET_CHART_NUMBER_SCAN_CODE(APPOINTMENT.PAT_SEQ, 103 /*:pChartInstitutionID*/, 0) AS PATIENT_CHART_EXT,
            PATIENT.PAT_IND_SPECIAL_RISK
        FROM
                   AS_T_APPOINTMENTS       APPOINTMENT,
                   AS_R_APPOINTMENT_TYPES  APPOINTMENT_TYPE,
                   AS_T_CLINICS            CLINIC,
                   CT_R_SPECIALITIES       SPECIALTY,
                   CT_R_INSTITUTIONS       INSTITUTION,
                   AS_T_APPOINTMENT_GROUPS APPOINTMENT_GROUP,
                   PI_T_PATIENTS           PATIENT,
                   PI_R_CONF_LEVELS        CONFIDENTIALITY,
                   PI_T_NAMES              NAME,
                   AS_T_APPOINTMENT_SEQ_MAPPING  SEQMAP
        WHERE
            SESSION_DATE >= TO_DATE('2004-04-01', 'YYYY-MM-DD') /*:P_VISIT_DATE_FROM*/ AND
            SESSION_DATE <= TO_DATE('2004-04-02', 'YYYY-MM-DD') /*::P_VISIT_DATE_TO*/ AND
            APPOINTMENT.APPOI_DOM_TYPE IN('A','AR') AND
            CLINIC.CLINIC_CODE = APPOINTMENT.CLINIC_CODE AND
            SPECIALTY.SPEC_CODE = CLINIC.SPEC_CODE AND
            INSTITUTION.INST_CODE(+) = APPOINTMENT.INST_CODE AND
            APPOINTMENT_GROUP.APPOI_SEQ (+) = APPOINTMENT.APPOI_SEQ AND
            APPOINTMENT_TYPE.APPTYPE_CODE (+) = APPOINTMENT.APPTYPE_CODE AND
            NAME.PAT_SEQ = NVL(APPOINTMENT.PAT_SEQ, APPOINTMENT_GROUP.PAT_SEQ) AND
            NAME.NAMTYP_CODE = 1 AND
            PATIENT.PAT_SEQ = NVL(APPOINTMENT.PAT_SEQ, APPOINTMENT_GROUP.PAT_SEQ) AND
            CONFIDENTIALITY.CONF_CODE (+) = PATIENT.CONF_CODE AND
            SEQMAP.APPOI_SEQ (+) = APPOINTMENT.APPOI_SEQ AND
            SEQMAP.APPOI_SEQ IS NULL
    ORDER BY
         VISIT_DATE, VISIT_TIME, PATIENT_CHART_NO

  • Retrieve data from the same table

    i have a table with following fields
    emp_no,name,salary,department,dept_prev,prev_emp_no.
    now i want retrieve emp_no,name,salary,department, from the data base for a perticular employeee number along with dept_prev
    but dept_prev is the prev_emp_no dept_prev
    now iam doing two query like this
    first query to retreive name,salary,department
    select name,salary,department from employee where emp_no = 10
    second to retrieve the dept_prev from the same table but this
    dept_prev must be based on prev_emp_no
    select dept_prev from employee where emp_no in(select prev_emp_no from employee where emp_no =10)
    can any one suggest to combine these two queries in a single sql statements, because all the fieldds are from the same table.
    Thanks

    Would this one solve it?
    SELECT emp.NAME, emp.salary, emp.department,
           prev_emp.dept_prev
      FROM employee emp,
           employee prev_emp
    WHERE emp.emp_no      = 10
       AND prev_emp.emp_no = emp.prev_emp_no;
    not tested
    C.

  • How to read the hierarchy data from the same table using loop in AMDP method

    Hi All,
    We have a requirement to get the top partner from BUT050 table.
    Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
    Example:
    For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
    For partner 3523(BUT050-PARTNER1)  there is partner 4544 (BUT050-PARTNER2) last level .
    so in this case for the partner 1234 the Top parent is 4544 .
    I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
    Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
    IV_Parent is the input partner and ev_top_parent is the output value.
    AMDP Procedure Method:
        DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
        DECLARE found INT := 1;
              iv_partner1 =  SELECT partner1 FROM but050
                              WHERE partner2 = iv_partner
                              AND reltyp = :iv_hierarchy
                              AND date_to >=  :lv_date
                              AND date_from <= :lv_date;
         WHILE found <> 0  do
           select partner1 into ev_top_parent from :iv_partner1;
                           iv_partner1 =  SELECT partner1 FROM but050
                           WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
                           AND reltyp = 'ZBP004'
                           AND date_to >= :lv_date
                           AND date_from <= :lv_date;
           select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
        END WHILE;
    This method is working fine, but here it is only taking one single partner and getting the top parent as output.
    Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
    Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
    Thanks.
    Regards,
    Laxman.P

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • MULTIPLE UPDATES/INSERTIONS TO THE SAME TABLE

    How can I update/insert mutiple rows into the same table from one form ?

    Hi,
    Using the portal form on table you can insert only a single row. You can use master-detail form to insert multiple rows.
    Thanks,
    Sharmila

  • Multiple Threads writing to the same stream and "Write End Dead"

    Hi, I'm wondering what is the proper method for having multiple threads write to the same stream.
    Right now I have PipedWriter that I give to several Threads.
    However the JLS specifies that when the thread writing to PipedWriter dies, an exception will be generated. Does it mean that I may get a "write end dead" exception when any of the threads dies?
    More specifically I'm trying to extract keywords from a set of pages and print out keywords with their contexts (using threads to avoid a single blocked pages from blocking entire process)

    Your topic says "stream" but your post says "writer" - there's a difference. Readers/writers use the native encoding (which is correct if, for example, you're reading .DOC files created in Windows) while streams use UTF-8 encoding (which is correct if you've got one java app talking to another).
    Multiple threads can output to the same source. You've probably seen really annoying examples as your own System.out.println()s get intermixed with other JVM output in the JVM's window. Synchronization is going to be a serious issue.
    As to the exception, why not just catch it and ignore it?

  • Want to select individual data as well as aggregate data from the same table

    want to select a, b  from tab1  also need to find in the same table  tab1 need to do sum(b) group by a

    SELECT a,b,0 AS Ord
    FROM tab1
    UNION ALL
    SELECT a,SUM(b),1
    FROM tab1
    GROUP BY a
    ORDER BY a,Ord
    assuming SQL Compact
    If its SQL Server then we have much simpler methods
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for