CVI Distibution with Database Functions

I am working with CVI2012.  I have an application that uses the SQL toolkit.  I made a distribution and installed it on a target machine (Windows 7 with the CVI2012 runtime engine).  However when I install the application on another target (also a Windows 7 machine and also with the CVI2012 runtime engine) I cannot not initialize the database.  The application fails on a call to DBInit(DB_INIT_MULTITHREADED).  I get an error of -100: DB_FAILED_TO_LOAD_DLL.   (I am using  SQL Anywhere 11.)  I know that the ODBC configuration is the same on both targets and I can access the DB manually through Interactive SQL.     
I am baffled by this.  After some searching I found that the file "cvidb32.dll" was not in the system32 directory so I copied that over.  Still no joy.  (I would also expect this to be installed when I installed the RTE.  I did not have to manually copy this file on to the computer where the application does work.)  I have checked the forums here have not found a solutionl.  One post discussed running sqldistsupp.exe after the installer.  I tried this and got an error "Driver's ConfigDSN, ConfigDriver or ConfigTranslator failed in function SQLConfigDataSource".  Another post suggested simply adding CVISQLShared.msm to the installer.  I tried this but it did not fixt the problem.  I also tried downloading the SQL Distribution Toolkit help and it turns out the file has no content under the help topics.
Clearly something is missing but I don't know what.  I tried running Dependency Walker to find the missing DLL but it did not show anything was missing. 
Thoughts?
Thanks.

I have not distributed any applications with sql functionality, but looking at the following links it seems it can be a little tricky:
Why Do I Get Errors When I Try to Run a Distribution of a LabWindows™/CVI™ Program Which Uses the SQ...
LabWindows™/CVI SQL Toolkit 2.2 Readme
S. Eren BALCI
www.aselsan.com.tr

Similar Messages

  • Problem with database functions after disposing frames.....

    Hello,
    I have some problems with hangups with my app after disposing some frames...
    My scenario is something like this:
    - i have a login frame which instantiates some other application module and it disposes itself with some code like:
    this.dispose();
    this.finalize();
    System.runFinalization();
    System.gc();
    - after that the new instantiated module frame can return to the login frame by disposing itself and instantiating again the login frame with the same code like above
    my problem is that after some 2-3 tryes to login to a module - retun to login - login to module - return to module my app hangs on some code like:
    combobox.setSelectedIndex(0);
    or
    queryDataSet.executeQuery();
    i have to mention that i use a DataModule.
    do u have any ideas?
    thanks in advance.
    adrian

    >
    - i have a login frame which instantiates some other
    application module and it disposes itself with some
    code like:
    this.dispose();
    this.finalize();
    System.runFinalization();
    System.gc();
    Sounds like a bad idea all around.
    Finalize is supposed to be called by the gc - not by you.
    Almost always using finalize is either pointless or will cause memory leaks.
    do u have any ideas?
    I would guess it has nothing to do with JDBC.
    Are you catching SQLException and printing them out? If not then do so.
    If you are do you see any exceptions? If not then it isn't JDBC.

  • How to find the number of data items in a file written with ArryToFile function?

    I have written an array of number in 2 column groups to a file using the LabWindows/CVI function ArrayToFile...Now if I want to read the file with FileToArray Function then how do I know the number of items in the file. during the write time I know how many array items to write. but suppose I want the file to read at some later time then How to find the number of items in the file,So that I can read the exact number and present it. Thanks to all
    If you are young work to Learn, not to earn.
    Solved!
    Go to Solution.

    What about:
    OpenFile ( your file );
    cnt = 0;
    while ((br = ReadLine ( ... )) != -2) {
    if (br == -1) {
    // I/O error: handle it!
    break;
    cnt++;
    CloseFile ( ... );
    There are some ways to improve performance of this code, but if you are not reading thousands of lines it's quite fast.
    After this part you can dimension the array to pass to FileToArray... unless you want to read it yourself since you already have it open!
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Return value from database function taking a lot more time than the query

    Hi guys,
    I have a Query that does a call to a database function. The function takes in a few parameters and returns a Date. Now, the query within the function takes barely .05 seconds. However, doing a select get_join_dates from dual is taking almost 6 seconds for each call.
    Here is the Query:
    select s.student_id, s.student_name, s.organization_code
    from   student s
    where  s.student_id = :p_student_id
    and    s.student_enrollment_date = get_join_dates( :p_year,
                                                       :p_month,
                                                       :p_student_id,
                                                       s.organization_code );And here is the database function. The select inside this function barely takes 0.05 seconds per call. This function gets called 3 times in my case as there are 3 records in the org_body table for this student.
    create or replace function
    get_join_dates( p_yyyy in org_body.fiscal_yyyy%type,
                           p_month in  org_body.fiscal_mm%type,
                           p_student_id in student.student_id%type,
                           p_organization_code in org_body.organization_code%type) return date as
        t_enrollment_date  date;
        cursor cur_latest_enrollment_date is
          select max(enrollment_date)
          from   org_body
          where  fiscal_yyyy = p_yyyy
          and    fiscal_mm = p_month
          and    student_id = p_student_id
          and    organization_code = p_organization_code;
      BEGIN
        open cur_latest_enrollment_date ;
        fetch cur_latest_enrollment_date into t_enrollment_date;
        close cur_latest_enrollment_date ;
        return t_enrollment_date;
      exception
        when others then
          null;
    end;owever, when I run the following statement below, it takes close to 6 seconds to retrieve a record. In turn, my Query is becoming really slow and taking almost 35 seconds. Imagine that with more records.
    select get_join_dates( 2010, '01', '2167543', 'PSYCH01' ) from dual;If I run my query with this condition below, it takes 0.5 seconds.
    select s.student_id, s.student_name, s.organization_code
    from   student s
    where  s.student_id = :p_student_id
    and      s.student_enrollment_date = '01-JAN-10'Any ideas would be greatly appreciated.

    Any reason why you are doing this with the stored function?
    You could just do this with SQL. Embed the query in the function as a subquery in your initial query from STUDENT.
    select s.student_id, s.student_name, s.organization_code
    from   student s
    where  s.student_id = :p_student_id
    and    s.student_enrollment_date =
    (select max(enrollment_date)
          from   org_body
          where  fiscal_yyyy = :p_year
          and    fiscal_mm = :p_month
          and    student_id = s.student_id
          and    organization_code = s.organization_code);Why your function is not performing: I cannot say that with the information you have provided.
    Maybe sqltrace a call and see what the reason is.

  • How to pass dynamic parameter to a database function in OBIEE

    Hi,
    I have a requirement like this. I have to create one report in OBIEE which was in Discoverer. Now in discoverer report there are some calculated item in the worksheet based on database pkg.functions. The parameter which user gives at run time that parameters are then passed to the discoverer calculated items dynamically. But I am not able to do this in OBIEE answers.
    Can anyone tell me step by step how I can able to pass the user selected parameter values in OBIEE answer level.
    The example:
    GET_COMM_VALUE_PTD("AFE Cost & Commitment".Afe Id,:"Period Name(AFE)","AFE Cost & Commitment".Data Sel,"AFE Cost & Commitment".Org Id)
    GET_COMM_VALUE_PTD --- Function database
    ("AFE Cost & Commitment".Afe Id,:"Period Name(AFE)","AFE Cost & Commitment".Data Sel,"AFE Cost & Commitment".Org Id --- Parameters... :"Period Name(AFE)" is the dynamic parameter selected run time by user.
    Please help.
    Thanks
    Titas

    Hi,
    I already did that. But the existing discoverer re value report is showing correct value but the OBIEE report with EVALUATE function shows incorrect value.
    The requirement is to create a OBIEE Dashboard from a Discoverer existing report. Now in discoverer report theere are several calculated items in worksheet level where database custom function is used and user selected parameter value is passed run time in that function. But when that is created in OBIEE with EVALUATE function in RPD, the report shows incorrect data. Could not understand how to pass the parameter value runtime.
    Below is the discoverer 'Show SQL' query and EVALUATE function syntax which has been used.
    SELECT APPS.XXBG_PL_PROJ_ANALYSIS_AFE_PKG.GET_COMM_VALUE_PTD(XXBG_PL_PROJ_AFE_V.AFE_ID,
    :"Period Name(AFE)",
    XXBG_PL_PROJ_AFE_V.DATA_SEL,
    XXBG_PL_PROJ_AFE_V.ORG_ID),
    XXBG_PL_PROJ_AFE_V.AFE_DESC,
    XXBG_PL_PROJ_AFE_V.AFE_NUMBER,
    XXBG_PL_PROJ_AFE_V.APPROVED_AFE_AMOUNT
    FROM APPS.PA_PERIODS_ALL PA_PERIODS_ALL,
    APPS.XXBG_PL_PROJ_AFE_V XXBG_PL_PROJ_AFE_V
    WHERE ((XXBG_PL_PROJ_AFE_V.ORG_ID = PA_PERIODS_ALL.ORG_ID))
    AND (XXBG_PL_PROJ_AFE_V.DATA_SEL = :"Data Selection(AFE)")
    AND (PA_PERIODS_ALL.PERIOD_NAME = :"Period Name(AFE)")
    AND (XXBG_PL_PROJ_AFE_V.AFE_NUMBER = :"AFE Number(AFE)")
    AND (XXBG_PL_PROJ_AFE_V.OPERATING_UNIT = :"Operating Unit(AFE)")
    The EVALUATE function syntax is as below:
    EVALUATE('XXBG_PL_PROJ_ANALYSIS_AFE_PKG.GET_COMM_VALUE_PTD(%1,%2,%3,%4)' AS FLOAT , "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Afe Id", "BG PL Project Analysis Report_1"."Periods 1"."Periods 1.Period Name", "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Data Sel", "BG PL Project Analysis Report_1"."AFE Cost & Commitment"."AFE Cost & Commitment.Org Id")
    The PERIOD needs to be passed at run time which user will select.
    Please help to solve the issue.

  • Help with database connection

    ok I am trying to use dreamweaver's database function to
    connect to a mysql database, i fill in the info and it gives me the
    following error:
    "an unidentified error has occurred"
    I know all the info i am putting in is correct as I am copy
    and pasting it directly out of my connection properties in navicat
    mysql editor which can connect to the database fine
    i tried connecting to multiple databases on multiple servers
    and every single one returned the exact same error
    I am using Dreamweaver CS3 for Mac OSx
    thx for any help
    -Ryan

    Have you gone under the Application folder and clicked on the
    plus (+) sign and created the connection to the database.
    Also, do you have username and password on the database? If
    so, you'll have to provide this information
    I don't use MAC or PHP a great deal. So my help can be rather
    limited. I'm just thinking about connection strings
    What web server are you using? MAke sure it's running and set
    up correctly. Test the server first and see if it's working. If so
    see what connections string Dreamweaver is providing. I know Apache
    had a few bugs with various version just Windows has had in the
    past, not sure how these work with OSX

  • Installing Discoverer with Database Version Oracle 10g Express Edition

    Hello,
    Is it possilbe to install Discoverer with database version Oracle 10g Express Edition? I have Oracle Fusion Middleware 11.1.1.1.0 on my Windows XP machine as well. If so, can someone please provide me a link to the Discoverer download.
    Regards,
    Kelly

    Note that the Personal Edition of the database is 'the most powerful' version, in that it contains all features and options of the Enterprise Edition (expect RAC and Enterprise Manager packs)
    As such, the Personal Edition, at a mere USD$400-500 is one of the most cost effective for-fee products that Oracle has in it's inventory. It is targeted at the developer. And it comes with the complete set of Sample Data, whereas XE has a very limited subset (since it does not support all functionality).
    Express Edition is indeed free, but it is not supported, and can not be patched. OTOH it does have a lighter footprint.
    Again, I am not sure whether Disco 11g is compatible with Express Edition. (It's on my schedule for December ...)

  • How to encrypt password with hash function in Java?

    Hello, everybody!
    I will need to store user passwords in a database, but for stronger security I want to store these passwords hashed, so I know I will need a column for the password and for the salt value.
    So, I'd like that you indicate me a very good article or tutorial (preferable from Sun) that shows me how to use Java to encrypt and decrypt passwords with hash. It doesn't necessarily need to deal with database. I can implement this part myself after seeing how Java manage encryption with hash functions.
    Thank you very much.
    Marcos

    I will tell you more precisely what I want to get better for you to help me.
    As I said I implemented in .NET what I need to implement in Java now. In my
    database I have a table with this structure (I omitted that columns that are not
    necessary to our discussion):
    CREATE TABLE EMPLOYEES
    ID NOT NULL PRIMARY KEY,
    PASSWORD VARCHAR(40), -- password encrypted
    HASH_SALT VARCHAR(10) -- salt value used to encrypt password
    So, in the table I have a column to store the password encrypted and a column to
    store the salt value.
    Below is a little utility class (in C#) that I use to generate the salt and
    the hashed password.
    public static class PasswordUtilities
        public static string GenerateSalt()
            RNGCryptoServiceProvider encoder = new RNGCryptoServiceProvider();
            byte[] buffer = new byte[5];
            encoder.GetBytes(buffer);
            return Convert.ToBase64String(buffer);
        public static string EncryptPassword(string password, string salt)
            string encryptedPassword =
                FormsAuthentication.HashPasswordForStoringInConfigFile(
                password + salt, "SHA1");
            return encryptedPassword;
    }As you can see, the class is fairly simple. It only has two methods: one to
    generate the salt value that will be used to encrypt the password and another
    one to encrypt the password. The method HashPasswordForStoringInConfigFile of
    the FormsAuthentication class is what really hash the password with the salt
    value. This class belongs to the .NET library, so we can't see its source code,
    but it doesn't matter for our discussion as I know that we can implement
    something similar in Java.
    Below is a little sample code showing the use of the utility class above to
    encrypt a password.
    public class Encrypt
        public static void Main(string args[])
            string password = "Secret";
            string salt = PasswordUtilities.GenerateSalt();
            string encryptedPassword = PasswordUtilities.EncryptPassword(password, salt);
            // now I store 'encryptedPassword' in the PASSWORD column and 'salt'
            // in the HASH_SALT column in the EMPLOYEES table.
    }To verify if a password is correct I can use the code below:
    public class VerifyPassword
        public static void Main(string args[])
            string password = GetPasswordFromUser();
            // Let's assume that employee is an instance that corresponds to a row
            // in the database and the properties HashSalt and Password correspond
            // to the HASH_SALT and PASSWORD columns respectively.
            Employee employee = GetEmployeeFromDatabase(1);
            string salt = employee.HashSalt;
            string encryptedPassword = PasswordUtilities.EncryptPassword(password, salt);
            bool passwordMatch = employee.Password.Equals(encryptedPassword);
            System.Console.WriteLine(passwordMatch);
    }The only thing that interest me in this discussion is the PasswordUtilities class.
    As you saw its code is in C#, using the .NET framework libraries.
    What I want is to have this same little class coded in Java, to generate the salt
    value and to encrypt the password passed in using salt value generated. If you could
    help me to do that with articles that have what I want or with code that already do
    that I would really appreciate.
    Thank you in advance.
    Marcos

  • Cannot 'Synchronize with database' my entity objects

    Hello,
    I have successfully created entities in my model using the 'new buisness components from tables' function. But now my database moddel has changed and I would like to synchronize my entities with database to get newest colums, but when right clicking an entity, the 'Synchronize with database' link is greyed and cannot be selected.
    I have a database connection configured in my application resources and I can still import new tables in my project.
    Do you have any idea of what is happening? This is not the case for all my applications. I can still synchronize in some other ones
    Thank you for your help
    Stephane

    Synchronize with the database will be avaialble for the Entity Object
    I think there is a problem with the particular entity that got created when you did the business components out of tables..
    This is not the case for all my applications. I can still synchronize in some other onesif this is not happening with any other EO in any other application.. then you can try
    recreating the EO from the table..
    compare what is the change in between the EO that can synchronize and your current EO that cannot synchronize..
    another option might be to check the application.. if that is havign some hidden property to synchronize..
    last is to go with sameer's approach, to doubt about the table is not proper... in the same applciation create an EO with another table and try to synchronize.. you will get to actually the point where there is a problem..
    good luck.

  • TSODBC Error with TOP function

    Hello all.
    I'm have a prospect with Crystal 2008 in one big custmer here in Brazil. Here make the download of the trial version of Crystal 2008 and he are making several test with the tool.
    He are trying to get data from Kiwi system (Supplie Chan) with Crystal. He are using the ODBC of Transoft connection to reach the ISAM database.
    He are able to access the data with MS Acess and also with Crystal.
    The problem here that we need to use the TOP function in Crystal but it is not working. In MS Access, this function work fine.
    The error below is regarding the TSODBC error when trying to use the TOP function with Crystal 2008 (Add Command), but with MS Access it is work fine, have we one limitation or the MS Access solve this problem?
    "42000:[Transoft][TSODBC][usqlsd]')' expected here (TOP)
    The query below work fine in MS Access
    SELECT FACTRY.Job_number, (SELECT TOP 1 machine_number FROM FACTRY) AS WWW
    FROM FACTRY
    Can anyone help on this?
    Thanks a lot.
    Cássio

    Hello Cassio,
    if your SQL statement works in the database environment but not in Crystal Reports try to work with Database Views and simply use them as datasource.
    This could be better than recreating your SQL string to make it work in Crystal.
    Falk

  • Need valuable guidance to make a peformance oriented query, trying to replace unions with analytical function

    Hi,
       Please find below table structure and insert scritps. Requesting for vluable help.
    create table temp2 (col1 number,col2 varchar2(10),col3 number,col4 varchar2(20));
    insert into temp2 values (1,'a',100,'vvv');
    insert into temp2 values (2,'b',200,'www'); 
    insert into temp2 values (3,'c',300,'xxx');
    insert into temp2 values (4,'d',400,'yyy');   
    insert into temp2 values (5,'e',500,'zzz');
    insert into temp2 values (6,'f',600,'aaa');
    insert into temp2 values (7,'g',700,'bbb'); 
    insert into temp2 values (8,'h',800,'ccc');
    I am trying to get same output, what we get from below UNION query with ANALYTICAL Function.
    select * from temp2 where col1 in (1,2,3,4,5)
    union
    select * from temp2 where col1 in (1,2,5,6)
    union
    select * from temp2 where col1 in (1,2,7,8);
    I am seeking help by this dummy example to understand the concept, how can we use analytical functional over UNION or OUTER JOINS.
    In my exact query, I am using same table three times adding UNION clause. here also we scan temp2 three times, so for bulky tables using 'union'  would be hampering query's performance
    It means i go with three time scans of same table that is not performance oriented. With the help of above required concept, i will try to remove UNIONs from my exact query.
    Thanks!!

    Thanks for your time BluShadow and sorry as i think i couldn't make my query clear.
    I try it again. Below there are three queries, you may see all three queries are using same tables. Difference in all three queries are just few conditions, which makes all three queries diff with each other.
    I know, u cant run below query in your database, but i think it will convey my doubt to you. I have mentioned no. of rows with each clause and total i am getting 67 rows as my output. (Reason may be first n third query's result set are the subset of Second Query dataset)
    So i want to take all common rows as well as additional rows, if present in any of the query. This is getting easliy done with UNION clause but want to have it in other way as here my same is getting scanned again n again.
    SELECT
             START_TX.FX_TRAN_ID START_FX_TRAN_ID
            ,END_TX.FX_TRAN_ID END_FX_TRAN_ID
            ,START_TX.ENTERED_DT_TS
            ,USER
            ,START_TX.TRADE_DT
            ,START_TX.DEAL_NUMBER
            ,START_TX.FX_DEAL_TYPE
            ,START_TX.ORIENTATION_BUYSELL
            ,START_TX.BASE_CCY
            ,START_TX.BASE_CCY_AMT
            ,START_TX.SECONDARY_CCY
            ,START_TX.SECONDARY_CCY_AMT
            ,START_TX.MATURITY_DT
            ,START_TX.TRADE_RT
            ,START_TX.FORWARD_PTS              
            ,START_TX.CORPORATE_PIPS           
            ,START_TX.DEAL_OWNER_INITIALS      
            ,START_TX.CORPORATE_DEALER         
            ,START_TX.PROFIT_CENTER_CD
            ,START_TX.COUNTERPARTY_NM
            ,START_TX.COUNTERPARTY_NUMBER
      FROM
          (SELECT * FROM FX_TRANSACTIONS WHERE GMT_CONV_ENTERED_DT_TS >=  TO_DATE('20-Nov-2013 4:00:01 AM','DD-Mon-YYYY HH:MI:SS AM')) START_TX
           INNER JOIN
          (SELECT * FROM FX_TRANSACTIONS WHERE GMT_CONV_ENTERED_DT_TS <=  TO_DATE('20-Nov-2013 4:59:59 PM','DD-Mon-YYYY HH:MI:SS AM'))  END_TX
       ON START_TX.COUNTERPARTY_NM        = END_TX.COUNTERPARTY_NM         AND
          START_TX.COUNTERPARTY_NUMBER    = END_TX.COUNTERPARTY_NUMBER     AND
          START_TX.FX_DEAL_TYPE           = END_TX.FX_DEAL_TYPE            AND
          START_TX.BASE_CCY               = END_TX.BASE_CCY                AND
          START_TX.SECONDARY_CCY          = END_TX.SECONDARY_CCY           AND
          NVL(START_TX.CORPORATE_DEALER,'nullX')=NVL(END_TX.CORPORATE_DEALER,'nullX')       AND
          START_TX.ORIENTATION_BUYSELL='B'                                 AND 
          END_TX.ORIENTATION_BUYSELL='S'                                  AND
          START_TX.FX_TRAN_ID = 1850718                                  AND
         (START_TX.BASE_CCY_AMT           = END_TX.BASE_CCY_AMT          
          OR
          START_TX.SECONDARY_CCY_AMT      = END_TX.SECONDARY_CCY_AMT)        -- 10 Rows
    UNION
    SELECT
             START_TX.FX_TRAN_ID START_FX_TRAN_ID
            ,END_TX.FX_TRAN_ID END_FX_TRAN_ID
            ,START_TX.ENTERED_DT_TS
            ,USER
            ,START_TX.TRADE_DT
            ,START_TX.DEAL_NUMBER
            ,START_TX.FX_DEAL_TYPE
            ,START_TX.ORIENTATION_BUYSELL
            ,START_TX.BASE_CCY
            ,START_TX.BASE_CCY_AMT
            ,START_TX.SECONDARY_CCY
            ,START_TX.SECONDARY_CCY_AMT
            ,START_TX.MATURITY_DT
            ,START_TX.TRADE_RT
            ,START_TX.FORWARD_PTS              
            ,START_TX.CORPORATE_PIPS           
            ,START_TX.DEAL_OWNER_INITIALS      
            ,START_TX.CORPORATE_DEALER         
            ,START_TX.PROFIT_CENTER_CD
            ,START_TX.COUNTERPARTY_NM
            ,START_TX.COUNTERPARTY_NUMBER
      FROM
          (SELECT * FROM FX_TRANSACTIONS WHERE GMT_CONV_ENTERED_DT_TS >=  TO_DATE('20-Nov-2013 4:00:01 AM','DD-Mon-YYYY HH:MI:SS AM')) START_TX
           INNER JOIN
          (SELECT * FROM FX_TRANSACTIONS WHERE GMT_CONV_ENTERED_DT_TS <=  TO_DATE('20-Nov-2013 4:59:59 PM','DD-Mon-YYYY HH:MI:SS AM'))  END_TX
       ON START_TX.COUNTERPARTY_NM        = END_TX.COUNTERPARTY_NM         AND
          START_TX.COUNTERPARTY_NUMBER    = END_TX.COUNTERPARTY_NUMBER     AND
          START_TX.FX_DEAL_TYPE           = END_TX.FX_DEAL_TYPE            AND
          START_TX.BASE_CCY               = END_TX.BASE_CCY                AND
          START_TX.SECONDARY_CCY          = END_TX.SECONDARY_CCY           AND
          NVL(START_TX.CORPORATE_DEALER,'nullX')=NVL(END_TX.CORPORATE_DEALER,'nullX')  AND
          START_TX.FX_TRAN_ID = 1850718                                  AND
          START_TX.ORIENTATION_BUYSELL='B'                                 AND 
          END_TX.ORIENTATION_BUYSELL='S'                        --                                   67 Rows
    UNION 
    SELECT
             START_TX.FX_TRAN_ID START_FX_TRAN_ID
            ,END_TX.FX_TRAN_ID END_FX_TRAN_ID
            ,START_TX.ENTERED_DT_TS
            ,USER
            ,START_TX.TRADE_DT
            ,START_TX.DEAL_NUMBER
            ,START_TX.FX_DEAL_TYPE
            ,START_TX.ORIENTATION_BUYSELL
            ,START_TX.BASE_CCY
            ,START_TX.BASE_CCY_AMT
            ,START_TX.SECONDARY_CCY
            ,START_TX.SECONDARY_CCY_AMT
            ,START_TX.MATURITY_DT
            ,START_TX.TRADE_RT
            ,START_TX.FORWARD_PTS              
            ,START_TX.CORPORATE_PIPS           
            ,START_TX.DEAL_OWNER_INITIALS      
            ,START_TX.CORPORATE_DEALER         
            ,START_TX.PROFIT_CENTER_CD
            ,START_TX.COUNTERPARTY_NM
            ,START_TX.COUNTERPARTY_NUMBER
      FROM
          (SELECT * FROM FX_TRANSACTIONS WHERE GMT_CONV_ENTERED_DT_TS >=  TO_DATE('20-Nov-2013 4:00:01 AM','DD-Mon-YYYY HH:MI:SS AM')) START_TX
           INNER JOIN
          (SELECT * FROM FX_TRANSACTIONS WHERE GMT_CONV_ENTERED_DT_TS <=  TO_DATE('20-Nov-2013 4:59:59 PM','DD-Mon-YYYY HH:MI:SS AM'))  END_TX
       ON START_TX.COUNTERPARTY_NM        = END_TX.COUNTERPARTY_NM         AND
          START_TX.COUNTERPARTY_NUMBER    = END_TX.COUNTERPARTY_NUMBER     AND
          START_TX.FX_DEAL_TYPE           = END_TX.FX_DEAL_TYPE            AND
          START_TX.BASE_CCY               = END_TX.BASE_CCY                AND
          START_TX.SECONDARY_CCY          = END_TX.SECONDARY_CCY           AND
          NVL(START_TX.CORPORATE_DEALER,'nullX')=NVL(END_TX.CORPORATE_DEALER,'nullX') AND
          START_TX.ORIENTATION_BUYSELL='B'                                 AND 
          END_TX.ORIENTATION_BUYSELL='S'                                   AND
          START_TX.FX_TRAN_ID = 1850718                                  AND
            END_TX.BASE_CCY_AMT BETWEEN (START_TX.BASE_CCY_AMT - (START_TX.BASE_CCY_AMT * :PERC_DEV/100)) AND (START_TX.BASE_CCY_AMT + (START_TX.BASE_CCY_AMT * :PERC_DEV/100))        
            OR
            END_TX.SECONDARY_CCY_AMT BETWEEN (START_TX.SECONDARY_CCY_AMT - (START_TX.SECONDARY_CCY_AMT*:PERC_DEV/100) ) AND (START_TX.SECONDARY_CCY_AMT + (START_TX.SECONDARY_CCY_AMT*:PERC_DEV/100))
        );                                                       ---                              10 Rows

  • EVALUATE in OBIEE with Analytic function LAST_VALUE

    Hi,
    I'm trying to use EVALUATE with analytic function LAST_VALUE but it is giving me error below:
    [nQSError: 17001] Oracle Error code: 30483, message: ORA-30483: window functions are not allowed here at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    Thanks
    Kumar.

    Hi Kumar,
    The ORA error tells me that this is something conveyed by the oracle database but not the BI Server. In this case, the BI server might have fired the incorrect query onto the DB and you might want to check what's wrong with it too.
    The LAST_VALUE is an analytic function which works over a set/partition of records. Request you to refer to the semantics at http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions073.htm and see if it is violating any rules here. You may want to post the physical sql here too to check.
    Hope this helps.
    Thank you,
    Dhar

  • Calling Database Functions

    Hi All,
    Just wondering whether anyone has experienced problems in calling a database function. We have Forte 3.0.L.2 and Oracle 8.1.7. Here's how the function is being called:
    l_tdCurrentStatus = (SQL EXECUTE PROCEDURE me_status.get_status(input I_MCR_ID = theMember.CurMCR.MCR_ID) ON SESSION self.DefaultDBSession);
    We are using SQL EXECUTE PROCEDURE syntax to call the function since there is no specific way to call functions.
    We have tried calling the function in a SELECT clause and didn't face any issues so far. But I'd like to know the right way to call a function.
    Any help is greatly appreciated.
    Thanks,
    Madhu
    Fri Feb 13 15:40:21 : Database Error: Procedure me_status.get_status was invoked with a parameter named I_MCR_ID which
    h is unknown.
    Fri Feb 13 15:40:21 :
    Fri Feb 13 15:40:21 : USER ERROR: Procedure me_status.get_status was invoked with a parameter named
      I_MCR_ID which is unknown.
        Class: qqdb_UsageException with ReasonCode: DB_ER_PARAMETERERROR
        Error #: [801, 166]
        Detected at: qqdb_OracleData::VendorInitProcedure
        Last TOOL statement: method MemberPOM.GetMemStatusDyn
        Error Time: Fri Feb 13 15:40:21
        Server: @taz2rr, UserName: ecuser
        Database Statement: begin
          me_status.get_status(I_MCR_ID=>:I_MCR_ID);
          end;
        Exception occurred (locally) on partition "MWRouting_cl1_Part3",
          (partitionId = DD242BB0-B4AC-11D7-989B-C2D07EBCAA77:0x10435:0x1, taskId =
          [DD242BB0-B4AC-11D7-989B-C2D07EBCAA77:0x1042b:0x1.53094]) in application
          "MWRouting_cl1", pid 1036484 on node ServerNode in environment frt1ec.
        USER ERROR: Procedure me_status.get_status was invoked with a parameter
          named I_MCR_ID which is unknown.
            Class: qqdb_UsageException with ReasonCode: DB_ER_PARAMETERERROR
            Error #: [801, 166]
            Detected at: qqdb_OracleData::VendorInitProcedure
            Last TOOL statement: method MemberPOM.GetMemberStatus
            Error Time: Fri Feb 13 15:40:21
            Server: @taz2rr, UserName: ecuser
            Database Statement: begin
              me_status.get_status(I_MCR_ID=>:I_MCR_ID);
              end;
            Exception occurred (locally) on partition "MWRouting_cl1_Part3",
              (partitionId = DD242BB0-B4AC-11D7-989B-C2D07EBCAA77:0x10435:0x1,
              taskId = [DD242BB0-B4AC-11D7-989B-C2D07EBCAA77:0x1042b:0x1.53094]) in
              application "MWRouting_cl1", pid 1036484 on node ServerNode in
              environment frt1ec.

    Hello Madhu,
         The best to do this is:
    l_intmcrid : integer;
    l_intmcrid = theMember.CurMCR.MCR_ID;
    l_tdCurrentStatus : TextData;
    SQL EXECUTE PROCEDURE me_status.get_status(l_intmcrid) ON SESSION self.DefaultDBSession);
    If you want to get some kind of information out from the procedure then you will need to make a output variable on the procedure:
    SQL EXECUTE PROCEDURE me_status.get_status(l_intmcrid, output l_tdCurrentStatus) ON SESSION self.DefaultDBSession);
    This is the only way I know to call Oracle procedure. There are many examples in the CSAPOM project.
    ka

  • Database adapter: how to invoke database functions

    Hi there,
    i'm new in this forums. My name is Giulio and i work in Italy.
    I'm trying to invoke a database functions inside a bpel process.
    The function is very simple, this is the source code:
    create or replace function FNC_WriteSailing(PEventCode in varchar2, PXML In sys.xmltype) return number is
    begin
    Insert Into table_with_xml_column (filename, xml_document)
    Values (PEventCode, PXML);
    Commit;
    return(1);
    Exception When Others Then Return (0);
    end FNC_WriteSailing;
    I've tried to invoke functions withe only primitive data type as parameter. But i'm not able to invoke functions with CLOB or XMLTYPE parameter.
    I'm using jdeveloper version 11.1.1.4.0
    Could anyone help me? Thanks in advance.
    Regards,
    Giulio Dottorini

    you're not able to invoke them or you don't see them in the browser of the wizard of the db adapter?
    you should see them in there

  • XSL Database Functions throwing "ORA-01000: maximum open cursors exceeded"

    In my BPEL process, I have a large dataset requiring enrichment of the data by looking up values in a database. I'm doing this in an XSL transformation using either; orcl:lookup-table() or orcl:query-database() functions. This works ok for a number of records, but then fails with "ORA-01000: maximum open cursors exceeded".
    This implies that these functions are not closing down open cursors after use. Is this a bug, or can I configure the data-sources to handle this?
    Thanks.

    I don't see any settings to fix this on the data-source itself.
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28988/trouble.htm#BABCBFHA
    4.11.2 ORA-00604: Error Occurred at Recursive SQL Level 1 ORA-01000: Maximum Open Cursors Exceeded
    If i see this..Oracle just advices just to set the PROCESSES parameter on the database high enough so it wont happen :)

Maybe you are looking for

  • Can I attach a Touchscreen monitor to my W530 laptop to use with Window 8?

    I purchased a W530 laptop with WIndows 8.  Can I attach an external touchscreen monitor to use the Windows 8 touchscreen feature?    I was told by tech people, in office stores, that it wouldn't work becasue Windows 8 looks at your primary display an

  • Not able to display more than 65k records in Bex report.

    Hi Experts, I have requirement for the Bex report to display more than 65k records.. Please help me on this.. i am feed up of get proper update for this.. Its urgent.. pls help on this

  • New update for Fios DVR

    I keep getting a pop-up on my DVR that there is a software update but I can't select anything to update it.  Any one else having this issue?

  • IPAD ,PC,iPod content syncing

    I just got a new IPAD. Since setting it up, I'm unable to view my IPOD classic music content on my PC or my IPAD on iTunes. How can I get my IPOD content back on my PC and IPAD?

  • Task manager service

    Hi, I just completed tests with the task manager service (namely the UserTasks tutorial). Is there a possibility to ensure https requests to the web app that serves as the UI? (Possibly by configuring the process manager or deploying the web app to a