Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  database output format

    Posted 01/07/09 04:57 PM

    Originally posted by: SystemAdmin


    [glitter said:]

    Hi,

    Do you know how can i determine decimal places of my output while inserting it in to a table in the database?
    I tried the following code, but it gives error.
    DBExecute(db, "create table XBooks(BookID int, NbofBooks float(2)");
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: database output format

    Posted 01/07/09 10:09 PM

    Originally posted by: SystemAdmin


    [vblanchard said:]

    Hi,

    What type of database are your working with (Oracle, DB2, MS SQL Server, etc.)?
    To be able to help you, it would help if you could insert the code that actually writes to the database and the error message you get.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: database output format

    Posted 01/07/09 10:16 PM

    Originally posted by: SystemAdmin


    [glitter said:]

    i am working with  Microsaoft Access.
    And the code gives error as syntax error for the following line:
    DBExecute(db, "create table XBooks(BookID int, NbofBooks float(2)");


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: database output format

    Posted 01/07/09 10:53 PM

    Originally posted by: SystemAdmin


    [vblanchard said:]

    The "Create" statement you're using is not accepted by MS Access (you can test your query directly with Access).
    If you create the table without specifying the decimal place as below it works:
    DBExecute (db,"create table XBooks(BookID int, NbofBooks float)");


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: database output format

    Posted 01/07/09 10:58 PM

    Originally posted by: SystemAdmin


    [glitter said:]

    ok, do you know how to limit decimal places in a create statement?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: database output format

    Posted 01/07/09 11:04 PM

    Originally posted by: SystemAdmin


    [vblanchard said:]

    Unfortunately I don't know the syntax that MS Access would accept. Some forums dedicated on SQL for MS Access may be able to help you.
    Once you have an SQL statement that is valid for MS Access, it should work within OPL.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: database output format

    Posted 01/07/09 11:13 PM

    Originally posted by: SystemAdmin


    [glitter said:]

    ok, thanx
    #DecisionOptimization
    #OPLusingCPLEXOptimizer