[need help] Function body of PL/SQL returning the SQL with BI publisher

Hello

I'm new to BI publisher, back then I used ocj4 for pdf printing, but then we got BI publisher. We want to have a better relationship, since we always used the standard one.

My pl/sql like this look
DECLARE
  q varchar2(4000);
  list_betreuer htmldb_application_global.vc_arr2;
  list_semester htmldb_application_global.vc_arr2;
  list_status htmldb_application_global.vc_arr2;

BEGIN

 -- variable to store the list
 list_betreuer := HTMLDB_UTIL.STRING_TO_TABLE(:P61_BETREUER);
 list_semester := HTMLDB_UTIL.STRING_TO_TABLE(:P61_SEMESTER);
 list_status := HTMLDB_UTIL.STRING_TO_TABLE(:P61_STATUS);

 -- Query begins
 q:= 'select p1.name, p1.vorname , a1.tel, a2.tel, '; 
 q:= q||'ab.thema, ab.status, ab.typ, s.bezeichnung, p2.name ';
 
 q:= q||'from person p1, person p2, adresse a1, adresse a2, ';
 q:= q||'zuordnungp_a zpa1,zuordnungp_a zpa2, ';
 q:= q||'abschlussarbeit ab, semester s ';

 q:= q||'WHERE ab.SEMESTER = s.OBJECTID (+) ';
 q:= q||'AND ab.STUDENT = p1.OBJECTID (+) ';
 q:= q||'AND ab.BETREUER = p2.OBJECTID (+) ';

 q:= q||'and p1.objectid = zpa1.person (+) ';
 q:= q||'and zpa1.adresse  = a1.objectid (+) ';
 q:= q||'and zpa1.art (+)= ''Privat'' ';

 q:= q||'and p1.objectid = zpa2.person (+) ';
 q:= q||'and zpa2.adresse  = a2.objectid (+) ';
 q:= q||'and zpa2.art (+)= ''Geschäft'' ';


 -- Loop for betreuer list
 FOR i in 1..list_betreuer.count
 LOOP
    IF i = 1 THEN
    q:= q||'AND (ab.betreuer = '||list_betreuer(i);
    ELSE
    q:= q||' OR ab.betreuer  = '||list_betreuer(i);
    END IF;
 END LOOP; if (list_betreuer.count>0)THEN q:= q||')'; END IF;

  -- Loop for semester list
 FOR i in 1..list_semester.count
 LOOP
    IF i = 1 THEN
    q:= q||'AND (ab.semester = '||list_semester(i);
    ELSE
    q:= q||'OR ab.semester = '||list_semester(i);
    END IF;
 END LOOP; if (list_semester.count>0)THEN q:= q||')'; END IF;
 
 -- Loop for status list
 FOR i in 1..list_status.count
 LOOP
    IF i = 1 THEN
    q:= q||'AND (ab.status = '''||list_status(i)||'''';
    ELSE
    q:= q||'OR ab.status = '''||list_status(i)||'''';
    END IF;
 END LOOP; if (list_status.count>0)THEN q:= q||')'; END IF;
 
 -- htp.p(q);
 return q;
 
END;
the question is how can I generate a pdf with this query using BI publisher report, what should I do?



Thanks in advance


Danny

Check this out to see if this helps you. This article talks about passing parameters to the BI publisher of Apex report.

http://tylermuth.WordPress.com/2008/03/31/call-bi-Publisher-Web-services-from-apex/

Thank you!

Tags: Business Intelligence

Similar Questions

  • JavaScript Command Window.getComputedStyle (document.body, ': after') .getPropertyValue ('content') returns the content with quotes

    When I use in my css:
    body: after {}
    content: "mobile";
    display: none;
    }
    And by controlling javascript with the command:
    size var = window.getComputedStyle (document.body, ': after') .getPropertyValue ('content');

    I get in firefox (mac v 23.0.1) returns the '' mobile' ' string with double quotes as return and, therefore, checking if size == 'mobile' returns false. In safari, the value returned 'mobile' without the quotes. How is it?

    What you get is a string that represents what you specified in the content.

    A content specification can include other things like a counter: body: after {content: "subjects []" counter (topics) "]" ;}}

    size = window.getComputedStyle(document.body,_':after').content would give: 'subjects []' counter (topics) "].

    If you need test the exact text of the contents: size == ' 'mobile "";

  • Need help to design a query to return the lines as shown below

    Hi all

    I have say emp table. I am trying to generate an extra column where it will contain for the 3 first lines say I generates 1, then 3 rows I will generate 2 like that.

    I'm checking a number of different options, but I do not get a clear idea on how to generate.

    Grateful if someone can throw an idea about it.

    Thank you

    MK.

    Hello

    Why do you want 'SMITH', 'ALLEN' and 'QUARTER' for are given the number 1?  Why not, say, "SMITH", "JONES" and "MILLER"?   If you use words like 'first' or 'next' in your explanation, explain what they mean, since there are many different ways to sort the lines.

    Maybe you care even with 3 employees are assigned the number 1, so long as exactly 3 get number 1, another 3 get number 2, and so on.

    I'm guessing you want something like this:

    SELECT CEIL (ROW_NUMBER () OVER (ORDER BY empno)

    / 3

    ) AS r_num

    empno, ename, job, mgr, hiredate, sal, comm, deptno

    WCP

    ORDER BY empno

    ;

    ROWNUM is a keyword from Oracle, this is not a column name good.  I used r_num instead.  (According to your limit, you can use ROWNUM to get r_num.)

  • the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    Hello

    It seems that you want to restore the files removed from the memory card.

    I will definitely help you with this.

    I would say you can search the Internet for data recovery software by using your favorite search engine.

    Warning: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    It will be useful. If you have any other questions, feel free to let us know. We will be happy to help you.

    Thank you.

  • I need help to write a script that detects the first instance of a paragraph style and then change

    I need help to write a script that detects the first instance of a paragraph style and then he goes to a different paragraph style.  I don't necessarily need someone to write all this, by the biggest problem is to find how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thank you!

    Hello

    then try this with your active doc:

    ....................

    myDoc var = app.activeDocument;

    mStyle var = myDoc.paragraphStyles.item ("PS_NameToFind"); change the name to paraStyle

    var mStyle_1 = myDoc.paragraphStyles.item ("PS_NameToChange"); change the name to paraStyle

    var mFrames = myDoc.pages.everyItem ().textFrames.everyItem () .getElements ();

    app.findTextPreferences = null;

    app.findTextPreferences.appliedParagraphStyle = mStyle;

    for (var k = 0; k)< mframes.length;="">

    {

    currFound = mFrames [k] .findText ();

    If (currFound.length > 0)

    currFound [0] .paragraphs [0] .appliedParagraphStyle = mStyle_1;

    }

    app.findTextPreferences = null;

    ................

    Rgds

  • a function that returns the type with a table joint!

    Good day to all,
    I have a function that returns a type.

    so I select it as:
    Select * from table (function (param1, param2))

    now I want to combine this with a table so that the settings for the service we get from the join table. Is this possible? And how?
    I tried different options without success.

    something like:
    Select *.
    table table (function (b.column1, b.columnb) x), tablea b
    where x.a = b.col

    Is this possible?

    Thanks in advance?

    user564819 wrote:

    something like:
    Select *.
    table table (function (b.column1, b.columnb) x), tablea b
    where x.a = b.col

    Is this possible?

    Somehow...

    SQL> create or replace type TIntegers is table of integer;
      2  /
    
    Type created.
    
    SQL>
    SQL> --// our sample pipeline simply spews 2 numbers for eevry number input - simple
    SQL> --// to use for the testcase below
    SQL> create or replace function FooPipe( n number ) return TIntegers pipelined is
      2  begin
      3          pipe row( trunc(n) );
      4          pipe row( trunc(n)*-1 );
      5          return;
      6  end;
      7  /
    
    Function created.
    
    SQL>
    SQL> with dataset( n ) as(
      2          --// ignore this part as it only builts a base table
      3          --// for us to use to select values for input to
      4          --// to the pipeline - in "real world" use this table
      5          --// will already exist
      6          select
      7                  level
      8          from    dual
      9          connect by level <= 10
     10  ),
     11  pipe_line( n, array ) as(
     12          --// we run the pipeline as a nested table column
     13          --// in the SQL projection - the CAST is important
     14          --// in order to establish the nested table type
     15          select
     16                  d.n,
     17                  cast(
     18                          FooPipe(d.n) as TIntegers
     19                  )
     20          from    dataset d
     21  )
     22  --// we now use a standard query to unnest the nested table column
     23  select
     24          p.n,
     25          pipe_val.*
     26  from       pipe_line p, TABLE(p.array)  pipe_val
     27  /
    
             N COLUMN_VALUE
    ---------- ------------
             1            1
             1           -1
             2            2
             2           -2
             3            3
             3           -3
             4            4
             4           -4
             5            5
             5           -5
             6            6
             6           -6
             7            7
             7           -7
             8            8
             8           -8
             9            9
             9           -9
            10           10
            10          -10
    
    20 rows selected.
    
    SQL>
    

    Not sure I like it. What is the real problem that this method (driving a pipeline with input of a base table rows) is supposed to address? There may be a simpler and more elegant approach...

  • I need help for Windows Vista black screen during the connection, even with the login screen removed

    Hey, I have a problem in Windows Vista:

    I've been updating / updated my graphics card and it is the graphics card, I'm updating, after a while, a black screen will appear (PITCH BLACK) and I there is no cursor and I tried Ctrl + Alt + Delete, but nothing seems to work, after I turned off my laptop, starts to load then it was the new dark night! (NO LOGIN SCREEN). Then I turned off my laptop then I constantly pressed f8, then I pressed "Computer repair" then it loads then my screen showed "Another user", then I clicked it then I had to type my ID but I have no details of connection, I pressed on enter with no connection details, but this still does not work because I had to type in my login information. I tried everything, then I went to safe mode and fact a password and changed my admin account type, then I rebooted my laptop, then I have constantly pressed f8 and pressed "Computer repair" then it loads and then my screen showed 'Another user' again... .

    PLEASE I NEED HELP! I WANT TO PLAY MY GAMES!

    Hello

    Follow the steps below:

     

    Method 1: Do the Startup Repair to fix the problem.

    See the following article for more information on the Startup Repair:

    Startup Repair: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

     

    Method 2: Use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    For instructions, see the following article:

    How to use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    http://support.Microsoft.com/kb/927392

    Let us know if that helps.

  • BlackBerry software I need help to recover after link uninstalled during the attempt to download the updated drivers

    I bought a new unlocked classic.  I planned to spend my Q10 classic using the option of switch device in link.  I think I got the link c. 1.2.3.56 (or perhaps 58?) installed on my PC Pro Windows 8.1.

    Using the link I saved my Q10 and then connected the classic with the USB cable.  The classic said she needed new drivers.  Soon, I had the opportunity to download BB Blend, link, and drivers.  I chose the option install the mixture and update link and drivers.  Installation/update failed.  I remember exactly the message error, but according to me, says he will have to try again.

    I was stunned to see that the shortcut on the liaison office had disappeared!  The list of programs in the control panel Windows only shows BlackBerry Device Software updater installed.  Only \BlackBerry Link\en\help_files in the folder of the RIM on the hard drive.  I can't find an executable anywhere.

    I downloaded the link and tried to install it, but after that I got the message that a newer version is already installed on my PC, I cancelled it.

    How can I recover?  I would get the back link, the new software of mix and current Windows drivers required for the classic.  Fortunately, my last backup of the Q10 is there in the \users\username\documents\BlackBerry\backup folder.

    Finally, I considered using the app of the switch of the device on both devices, but I could not download it.  On both devices, I got the error message: "year error has occurred and BlackBerry World will be closed."  Try to wait a few minutes and reopening BlackBerry World. "That was hours ago.  I'll search the forum hardware for more information about BB world.

    Thanks in advance for your help.

    C W Byrd

    You can also try a refresh if you wish.

    http://Windows.Microsoft.com/en-us/Windows-8/restore-refresh-reset-PC

  • How to run the function body that is stored in the variable string?

    Hello!

    Let's say we have a function body stored in the string variable, like this:

    ......

    ......

    var body: String = "public function display_message(kom:String):void {mx.controls.Alert.show (kom) ;};

    .....

    Here, I would like to do something with variable 'body' to run the code in this variable, is - it possible?

    ......

    ......

    With regard to the bars.

    d.Eval can do what you want. check it out at http://www.riaone.com/products/deval/index.html

  • Reinstall using equipment and systems. What do I need to watch out! How to return the good?

    I had to reinstall Vista x 64 (Dell Inspirion) but had to reformat HD using my HP a1223w. I installed XP first, with the product key. Then transferred to the Dell HD. The upgrade was not an option. So I made a regular intall(1st choice) this Vista install not asked me product key of Vista. Do I need to install it? I think that the answer is Yes! I'm not able to install the hardware monitor with the Dell software I have. My monitor shows like a Plug n Play and will not update drivers. If all of the fitting is not set properly, how can I reset/enter the product key? Thank you.

    Hello

    "I have had to reinstall Vista x 64 (Dell Inspirion) but had to reformat HD using my HP a1223w. I installed XP first, with the product key. Then transferred to the Dell HD. »

    This isn't the way to do it.

    Here's how you reinstall Vista on a Dell computer.

    Using the Dell recovery partition.

    http://support.Dell.com/support/topics/global.aspx/support/KCS/document?c=us&l=en&s=Gen&docid=DSN_336966&isLegacy=true

    Using the Dell disc.

    http://support.Dell.com/support/topics/global.aspx/support/KCS/document?c=us&CS=19&l=en&s=DHS&docid=DSN_339949&isLegacy=true

    We cannot give you advice on your workaround solutions; We show you how do it right with Dell information.

    See you soon.

  • need to be re-issued missing links to the files with the extensions

    I work with files from another company. All InDesign files have links in the links with no extensions palette. The real link themselves files HAVE extensions (mostly .jpg, .psd, .ai, .pdf, etc.). All links appear as absent, and when I try to recreate a link to them that I have to do them all individually, even if all the necessary links are in the same folder (WITH extensions). I tried 'Re-edit to Folder' and "File to repeat Extension", but because there is not an extension as a first step, it simply doesn't. It's really time to recreate a link to them one at a time, since there are about 40 files InDesign averaged around 40 links each.

    I have only one possibility for this file in question, given that links are provided. The file name corresponds perfectly with what is displayed in the links Panel, except for the extension. For example, "CBZ70.howtoshootbw.beach1" appears in the links Panel, and I want to make a link to "CBZ70.howtoshootbw.beach1.jpg". I know additional periods in the file name is a big no-no. This is another unfortunate aspect of the project. This is the naming convention used for hundreds of links. I have the software for renaming batch files, but for this project, I really want to avoid changing the names of files. It's the first of the 12 projects similar, all with the same problem, so my hope is to find a solution that will help both now and in the future.

    I posted this in the general forum of InDesign (http://forums.adobe.com/message/4033140#4033140), and the users he thought it should be scriptable. Can anyone offer any help? Thank you!

    ( Just as I was typing my responselast night, my modem is blown!...) Then I went to sleep first. )

    You can test this? I do not have a file by hand with links with missing extensions (and the subfolders to start), but according to the debug output it expected to lean down in some files are there.

    var i, j, searchfolder;
    for (j=0; j 0)
      return result;
    folderList = Folder(path).getFiles(function(item) { return item instanceof Folder && !item.hidden; });
    
    for (fl=0; fl 0)
       return result;
    }
    return [];
    }
    
  • Function body of pl/sql returning the SQL query

    < code >
    v_code: = "Code:";
    V_calls: = ' calls:';
    V_region: =' region:';

    v_sql: = ' SELECT "' | v_code | " ' || CODES.NAME | " ' || v_calls | " ' || (select count (t.code) in case where t.code = cases.code group by code) as Total_Calls, "' | V_region | " ' || CASE. Region,

    (select count (tt.region) in case t where t.region = cases.region and t.casecode = cases.casecode group by region) as calls

    CODES, CASES
    where the BUSINESS. CASE CODE = CODES. BRIEFCODE ';

    < code >
    I have to do a separate on the selection above and I get error when I put as follows.

    < code >

    v_sql: = ' SELECT distinct "' | v_code | " ' || CODES.NAME | " ' || v_calls | " ' || (select count (t.code) in case where t.code = cases.code group by code) as Total_Calls, "' | V_region | " ' || CASE. Region,

    (select count (tt.region) in case t where t.region = cases.region and t.casecode = cases.casecode group by region) as calls

    CODES, CASES
    where the BUSINESS. CASE CODE = CODES. BRIEFCODE ';

    < code >

    Hello

    Try

    v_code := 'Code :';
    V_calls := 'Calls :';
    v_region:='Region:';
    
    v_sql := 'SELECT '''||v_code||'''||CODES.NAME ||'''||v_calls||'''|| (select count(t.code) from cases t where t.code = cases.code group by code ) as Total_Calls, '''||v_region||'''||CASES.REGION Region,
    
    (select count(tt.region) from cases t where t.region = cases.region and t.casecode = cases.casecode group by region) as Calls
    
    from CODES,CASES
    where CASES.CASECODE = CODES.BRIEFCODE ';
    
    v_sql := 'SELECT DISTINCT * FROM ( ' || v_sql || ')';
    

    Kind regards
    Jari

  • Need help to form a query SQL/PLSQL

    Hello
    I'm not an expert in Oracle SQL. I need to have this query to improve the performance of my product. I have a table T that has a collar of column that is of type varchar. The neck is unique in the table (no two rows have the same value for the collar). Given a set S1 with 100 channels, the query should return me all channels in S1 who are not present in the neck.
    SQL query or PLSQL would be perfect. The query can have strings (elements of S1) hardcoded into it.

    Thanks in advance,
    Madhu

    user13290641 wrote:
    They are separate strings. They will be most likely hard-coded.

    In this case to pass them on in the form of record set as shown below, so that you can use operator LESS to get your result.

    with static_result_set as
    (
    select  'aaa' col from dual
    UNION ALL
    select  'xxx' from dual
    UNION ALL
    select  'ccc' from dual
    UNION ALL
    select  'zzz' from dual
    )
    select col from static_result_set
    minus
    select col from t
    
  • Need help bridge database for MS SQL Server, error ORA-28546 configuration problems

    Dear all,

    I'm trying to configure Oracle to MS SQL Server(I don't have admin access to the MS SQL Server) database gateway.  When I try to test the dblink connection, I get the following error.

    I published select * from dual@xyz;

    ORA-28546: initialization of the connection failed, probable Net8 admin error

    ORA-28511: interruption of the RPC connection to heterogeneous remote agent using SID = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=localhost) (PORT = 1521)) (CONNECT_DATA = (SID = dg4msql)))

    ORA-02063: preceding 2 lines of xyz

    28546 0000 - ' failed to initialize connection, unlikely Net8 admin error.

    My setup is as follows.

    1 oracle 11 GR 2 under Oracle Linux 6, the same gateway version is installed on the same server but different base directory.

    2 oracle DB base directory is u01/app/oracle/product/11.2.0/dbhome_1, gateway home directory is/u01/gateway.

    3. I use the same file listener.ora for db and the entry door.

    4. the content of my listener.ora, tnsnames.ora and the initdg4msql.ora is below.

    /U01/app/Oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

    LISTENER =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    #(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1522))

    (ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = db.abc.com.tw))

    )

    )

    MSSQL =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))

    )

    )

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (GLOBAL_DBNAME = db.abc.com.tw)

    (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME = orcl)

    )

    )

    SID_LIST_mssql =

    (SID_LIST =

    (SID_DESC =

    (SID_NAME = dg4msql)

    (ENVS = LD_LIBRARY_PATH = / u01/gateway/dg4msql/pilot/lib: / u01/gateway/lib)

    (Program name = / u01/gateway/bin/dg4msql)

    )

    )

    /U01/app/Oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

    LISTENER_ORCL =

    (ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = db.abc.com.tw))

    ORCL =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = db.abc.com.tw))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = orcl.abc.com.tw)

    )

    )

    dg4msql =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP) (HOST = localhost)(PORT = 1521))

    (CONNECT_DATA = (SID = dg4msql))

    (HS = OK)

    )

    /U01/gateway/dg4msql/Admin/initdg4msql.ora

    HS_FDS_CONNECT_INFO=[192.168.0.1]:1433//XIETEST

    # replacement connect format is the name of host/serverinstance/databasename

    HS_FDS_TRACE_LEVEL = 255

    HS_FDS_RECOVERY_ACCOUNT = RECOVERY

    HS_FDS_RECOVERY_PWD = RECOVERY

    the dblink is created with the following statement.

    CREATE DATABASE LINK "xyz.abc.COM.TW".

    CONNECT TO ITS IDENTIFIED BY

    With the HELP of "dg4msql";

    Couple of other things I did to check the above works.

    [oracle@db admin] $ ping 192.168.0.1

    PING 192.168.0.1 (192.168.0.1) 56 (84) bytes of data.

    64 bytes from 192.168.0.1: icmp_seq = 1 ttl = 61 time = 7.61 ms

    64 bytes from 192.168.0.1: icmp_seq = 2 ttl = 61 time = 7,41 ms

    ^ C

    -ping 192.168.0.1 - statistics

    2 packets transmitted, 2 received, 0% packet loss, time 1818ms

    RTT min/avg/max/leg = 7.417/7.516/7.615/0.099 ms

    [oracle@db admin] $ tnsping dg4msql

    AMT Ping utility for Linux: Version 11.2.0.1.0 - Production on 2013-SEPT-11 10:53:11

    Copyright (c) 1997, 2009, Oracle.  All rights reserved.

    Use settings files:

    /U01/app/Oracle/product/11.2.0/dbhome_1/network/admin/SQLNET.ora

    TNSNAMES adapter used to resolve the alias

    Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SID = dg4msql)) (HS = OK))

    OK (0 msec)

    [oracle@db admin] $ lsnrctl status mssql

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 2013-SEPT-11 10:54:23

    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=localhost) (PORT = 1521)))

    STATUS of the LISTENER

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

    Alias mssql

    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

    11-SEP-2013 start date 10:09:46

    Uptime 0 days 0 h 44 min 37 sec

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Parameter Listener of the /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora file

    The listener log file /U01/app/Oracle/diag/tnslsnr/DB/MSSQL/alert/log.XML

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=127.0.0.1) (PORT = 1521)))

    Summary of services...

    Service 'dg4msql' has 1 instance (s).

    Instance of 'dg4msql', status UNKNOWN, has 1 operation for this service...

    The command completed successfully

    Obviously, I'd like to get this configuration to work, but I have also a couple other questions about this configuration.

    1. for the installation of the bridge, he wants to run the root.sh script.  the script root.sh as to what follows.

    Enter the full path of the local bin directory: [/ usr/local/bin]:

    The 'dbhome' file already exists in the usr.  Overwrite it? (y/n)

    [n]: n

    The 'oraenv' file already exists in the usr.  Overwrite it? (y/n)

    [n]: n

    The 'coraenv' file already exists in the usr.  Overwrite it? (y/n)

    [n]: n

    the above answer is correct?

    Thanks for reading.

    The strace shows:

    2796 open ("/ u01/app/oracle/diag/tnslsnr/db/mssql/trace/mssql.log", O_WRONLY |) O_CREAT | O_APPEND, 0660) = 12

    9564 access ("/ u01/app/oracle/product/11.2.0/dbhome_1/dg4msql/admin/initdg4msql.ora", F_OK)

    2796 write (12, "2013-SEPT-11 15:02:44 * (CONNECT_"..., 175 ")")

    9564 <... access="" resumed="">) =-1 ENOENT (no such file or directory)

    2796 <... write="" resumed="">) = 175

    2796 close (12

    9564 brk (0x14a3000) = 0x14a3000

    2796 <... close="" resumed="">) = 0

    2796 poll ([{fd = 8, events = POLLIN |}]) POLLRDNORM}, {fd = 11, events = POLLIN |} [POLLRDNORM}, {fd-=-1}, {fd = - 1}]-1, 4

    9564 access ("/ u01/app/oracle/product/11.2.0/dbhome_1/dg4msql/log/dg4msql_agt_9564.trc", F_OK) =-1 ENOENT (no such file or directory)

    9564 access ("/ u01/app/oracle/product/11.2.0/dbhome_1/dg4msql/log/dg4msql_agt_9564.trc", F_OK) =-1 ENOENT (no such file or directory)

    9564 statfs ("/ u01/app/oracle/product/11.2.0/dbhome_1/dg4msql/log/", 0x7fff91f005b8) =-1 ENOENT (no such file or directory)

    9564 open ("/ u01/app/oracle/product/11.2.0/dbhome_1/dg4msql/log/dg4msql_agt_9564.trc", O_WRONLY |) O_CREAT | O_TRUNC, 0666) =-1 ENOENT (no such file or directory)

    => so that it always uses the database as Oracle_home House

    With this info, I rechecked the listener and saw that you are missing the ORACLE_HOME setting in the dg4msql section of SID. Please correct your entry to mssql_sid to:

    SID_LIST_LISTENER =

    (SID_LIST =

    (SID_DESC =

    (GLOBAL_DBNAME = db.abc.com.tw)

    (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)

    (SID_NAME = orcl)

    )

    )

    SID_LIST_mssql =

    (SID_LIST =

    (SID_DESC =

      (ORACLE_HOME = / u01/bridge)

    (SID_NAME = dg4msql)

    (ENVS = LD_LIBRARY_PATH = / u01/gateway/dg4msql/pilot/lib: / u01/gateway/lib)

    (Program name = / u01/gateway/bin/dg4msql)

    )

    )

    Then please stop and restart the mssql listener and check again.

    -Klaus

  • Need help to write a better SQL query

    Hi gurus,

    Please let me know your best query for the problem below:

    Suppose we have 2 tables in Oracle 10 G database:

    IM1: product and warranty sales records

    A: sales_id

    B: product QTY.

    C: quantity of product

    D: Service QTY.

    E: Service amount

    IM1 table:

    a b c d and e

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

    1 1 100 1 10

    2 1 150 1 70

    3 2 500 1 100

    4 1 100 0 0

    IM2: brand and product guarantee service term associated with record sales

    A: sales_id

    G: the Service life

    P: brand product of

    Z: flag of product/Service

    IM2 table:

    a    g               p          z

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

    1 sony NULL p

    1 monthly NULL g

    Dell 2 p, NULL reference

    Reg 2 g NULL

    NULL lenovo 3 p

    3 monthly NULL g

    Sony NULL 4 p

    Then, he must bring the "term of Service" and "Brand product" in line with the sales table, as below:

    ID h_qty h_amnt g_qty g_amnt brand term

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

    1 1 100 1 10 sony monthly

    2 1 150 1 70 dell Reg

    3 2 500 1 100 lenovo monthly

    4 1 100 0 0 sony NULL

    What I wrote myself is as below, but I want to know if there is a better idea to make the query more reliable, because real paintings are big and my query is slow.

    SELECT DISTINCT

    ID of the s.a,

    s.b h_qyt,

    s.c. h_amnt,

    Virginia g_qty,

    Sager g_amnt

    brand of the PDP,

    term of r.g

    Of

    (SELECT s.*, PDP FROM s im1, im2 p WHERE s.a = p.a. PDP AND IS NOT NULL).

    IM2 p,

    IM2 g

    WHERE s.a. = p.a.

    AND s.a. = g.a

    AND (p.z = 'p' AND WINS = 'g')

    OR (p.z = 'p' AND WINS = 'p' AND sagehomme = 0 AND s.p = pp)

    ORDER BY 1;

    Here you will find the table scripts:

    create table im1 (a number, b, c number, number d, e number);
    create table im2 (a number g char (10), char (10) p, z (1) tank);
    insert into values im1 (1,1,100,1,10);
    insert into values im1 (2,1,150,1,70);
    insert into values im1 (3,2,500,1,100);
    insert into values im1 (4,1,100,0,0);

    Insert in im2 values (1, null, 'sony', 'p');
    Insert in im2 values (1, 'Monthly', null, 'g');
    Insert in im2 values (2, null, 'dell', 'p');
    Insert in im2 values (2, 'Reg', null, 'g');
    Insert in im2 values (3, null, 'lenovo', 'p');
    Insert in im2 values (3, 'Monthly', null, 'g');
    Insert in im2 values (4, null, 'sony', 'p');

    something like below

    Select x.a as id, x.b as h_qty, x.c as h_amnt, Eliane as g_qty, x.e as g_amnt, min (y.p) as min (y.g) as mark

    -min (y.p) compared to (x.a partition) as min (y.g) on (x.a partition) as the term mark
    of im1, im2 XY
    where x.a = y.a
    Group of x.a, x.b, x.c, Eliane x.e

    Edited: putting aggregation function instead of the function min min Analytics

Maybe you are looking for

  • Numbers of crashing on the Sierra

    I'm under that numbers on macOS 16A304a Sierra 3.6.2 build (Public Beta 6) on a mid-2010 MacBook 2.4 GHz Core 2 Duo with 8 GB of RAM. I have a spreadsheet of costs where, as its name suggests, allows me to enter all my costs for my different bank acc

  • Why the weird behavior is the default value?

    Really just have pleaded that the "Default" behavior is changed. See http://www.TechSpot.com/blog/73/prevent-websites-from-resizing-Firefoxs-browser-window/ should be the norm. If I drag-and - drop a window of Firefox - I don't want to not maximized

  • ThinkPad T430 turn off screen without sleep?

    Hello, just bought a T430 here and I'm in love. The keyboard is similar to any desktop and the life of the portability and battery perfectly meet my needs. With the old T420, Fn + F3 turns off the screen without putting the computer to sleep so you c

  • Signature error code: customer ID is not in the database of the authorization

    Everything worked well on JDE 4.2. Then I installed JDE 4.5 and compiled my project to use it. But when I ask signature now it says "Code signing request failed because xxxxxxxxxx customer ID is not in the database for authorization. Please tell what

  • Windows 8 continues to change my power randomly plan options

    Windows 8 continues to change my options of power plan randomly (i.e. when to turn off display/go sleep). They will remain the same to slightly toward the bottom power cycles and then will change randomly to never sleep/turn off the display.