Value settings for database query

I have a database set up for item prices. Currently, the
database is set for currency and I have 1.99 and 2.99 entered in
the two fields. However, the cfm page form displays them as 1.9900
and 2.9900. Why is it adding the extra "00" at the end? The value
in the page coding is integer. Should I have it set at something
different? Also, how would I get a "$" to show before the price?
Thanks,
Dave

It is probable that your database is adding the extra zeros
as an
indication of the precision the field contains for currency.
Many
people care about those fractions of a cent and would not
want them
rounded off.
To display the data the way your desire, check out the
DecimalFormat(),
DollarFormat() and|or NumberFormat() functions.
Dave Blake wrote:
> I have a database set up for item prices. Currently, the
database is set for
> currency and I have 1.99 and 2.99 entered in the two
fields. However, the cfm
> page form displays them as 1.9900 and 2.9900. Why is it
adding the extra "00"
> at the end? The value in the page coding is integer.
Should I have it set at
> something different? Also, how would I get a "$" to show
before the price?
>
> Thanks,
> Dave
>

Similar Messages

  • Syntax for Database query on a simple java appl?

    Connection con;
    private boolean conFree = true;
    private String dbName = "java:comp/env/jdbc/gene";
    public geneDB () throws Exception {
    try{
         Context ic = new InitialContext();
         DataSource ds = (DataSource) ic.lookup(dbName);
    con = ds.getConnection();
    catch (Exception ex){
    throw new Exception("Couldn't open connection to database: " + ex.getMessage());
    String insertStatement =     "insert into gene (cds,status) values(" + cds + "," + status + ")";
    PreparedStatement prepStmt = con.prepareStatement(insertStatement);
    prepStmt.setString(1, cds);
    prepStmt.setString(2, status);
    prepStmt.executeUpdate();
    prepStmt.close();
    Any comments??? This is what i have done, pls comment....

    actually i m having some kind of trouble and i would like to confirm about the code design suggestion regarding about the database query using pointbase through a java web service.

  • Thread monitoring for database query

    Hi,
    I need to be able to store a database query in a thread. This means that the entire query from executing to return should take place in this thread (as well as connection etc). I would then like to know when it have finished its work so i can carry on some more porcessing.
    I tried doing this with two threads, one to do the work and the other to 'watch' and then tell me when is is done. However, i errors 'every now and again' to which i can attribute to my thread structure not working properly. I am using a synchronised class and code post the code if anyone wishes to see it, however, i would appreciate it if someone could give me a basic structure to how i can go about this so that i do not get these 'random' errors.
    Thanks Rudy

    Okay -
    I have an idea. Withut fully implementing your code, mind you.
    If looks like you're having problems with concurrent access to your Vector.
    A Vector is, of course, a Collection and a List (interfaces) - these are not thread safe. To make them thread safe, you need to "wrap" them.
    <lifted from JavaDocs>
    public static Collection synchronizedCollection(Collection c)
        Returns a synchronized (thread-safe) collection backed by the specified collection. In order to guarantee
    serial access, it is critical that all access to the backing collection is accomplished through the returned
    collection.
        It is imperative that the user manually synchronize on the returned collection when iterating over it:
      Collection c = Collections.synchronizedCollection(myCollection);
      synchronized(c) {
          Iterator i = c.iterator(); // Must be in the synchronized block
          while (i.hasNext())
             foo(i.next());
        Failure to follow this advice may result in non-deterministic behavior.
        The returned collection does not pass the hashCode and equals operations through to the backing
    collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the
    contracts of these operations in the case that the backing collection is a set or a list.
        The returned collection will be serializable if the specified collection is serializable.
        Parameters:
            c - the collection to be "wrapped" in a synchronized collection.
        Returns:
            a synchronized view of the specified collection.</lifted from JavaDocs>
    Give your Vector a wrapper and see if that solves your problem.
    +M                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Filter value selection for the query execution

    Dear experts!
    I am working with an input ready query (which is over an aggregation level), and we need to display in the selection variable screen the values for a charateristic from the InfroProvider, not from the Master Data.  I don't mind how to do this, but I need to do it and for the moment it seems impossible.  I've read note 984229 and in there it says that:
    <i>'Only Values in InfoProvider'
    In this case, only values of characteristics that are posted in the InfoCube dimensions or in the DataStore are used for the input value request. This D-mode is valid for InfoCubes or the DataStore as an InfoProvider and for MultiProviders that have only InfoCubes and/or a DataStore as part providers. An exception to this is characteristics that are modeled as a Line Item Dimension. D-mode is not supported for this.</i>
    I am over an aggregation level, and thus SAP says it is not possible with the F4, but I don't mind if I have to code whatever, but I need someway to do this.......
    I need whatever type of solution......I am open to any kind of help you can provide me...... =) please!!!!
    Points will be given to helpful answers
    Thanks and kind regards.
    Cecilia

    Could you please check as per Note 1565809 and make sure the F4 mode is really M mode in each level settings?

  • Cloud Control 12c: no values for "Database CPU Time (%)"  for 9i databases

    Hi ,
    we have several databases in our CloudControl - and for most of them (Oracle release 10g or higher) the value "Database CPU Time (%)" under the tab "Databases" has a value. For databases of version 9i this value always shows up as a "-" sign - and for a few databases of version 10g or 11g, too.
    Is this a known issue of the CloudControl or the agent?
    We are using CloudControl 12.1.0.1.0.
    Any help will be appreciated.
    Rgds
    Jan

    Please post a screen shot. DB time instrumentation was added in DB 10g so that may be why in pre-10g databese, the value is absent. It should show up for 10g and higher databases though as long as they (user calls) have some CPU consumption to report.
    -Mughees

  • Certified Monitoring Template for Database Instances?

    I am setting up monitoring templates on OEM 12.1.0.3 for hosts, agents, database instances etc by copying and modifying the Oracle Certified Templates using "Create Like" then apply to my targets.  There are certified templates for hosts and agents but I don't see one for Database Instances.  Is there a certified templates for Database Instances (such as metrics for tablespace used %, share pool caching %, alert etc)?

    There is no Oracle Certified template for database instances. You may want to use default (out-of-box) metric collection settings for database instances as a basis for your template.
    Here is one way:
    - Navigate to Enterprise > Monitoring > Monitoring Templates.
    - Click Create and select a database target, which still has out-of-box (default) metric settings.
    - Continue to create the template.
    Regards,
    - Loc

  • How to pass Multi and Singlr value Parameters to DB2 query, which is using in SSRS report for ODBC connection

    Hi Guys,
    I am using DB2 database in SSRS. I have to pass Single Value and Multi Value Parameters. I tried with Select * From DB2Table Where
    Column=@PRM_Name Or Select * From DB2Table Where
    Column=:PRM_Name . It is not working and throwing error. Please help me out.
    Connection Details: ODBC
    Thanks Shiven:)

    Hi SKM,
    So you mean to say that Go to DataSource->Add Dataset-> Query Type-Text-> Under Query:
    click on fx (Expression)-> Write this expression
    For Single Value Parameter:
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city = '" + Parameters!City.Value + "'"
    OR
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city =  '" & Parameters!City.Value & "'"
    Keep it in mind if Parameter is String then
    It should be in Single quote ''.
     Like
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable WHERE city
    ='Hyderabad' "
    For Multivalu Parameter:
    ="SELECT EmployeeID, FirstName, LastName, LoginID FROM SHIVEN.AUDIT Where FirstName
    in ('" + REPLACE(JOIN(Parameters!City.Value,","),",","','") + "')"
    NOTE:
    If your Parameter is Single Value Parameter and You want to enter string values with Coma (,)
    separated (Like Hyderabad, Chennai, Delhi).
    In this case, you have to use below expression.
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city IN ('" + REPLACE(Parameters!City.Value ,",","','") + "')"
    OR
    ="SELECT customer_name, telephone_number, address1, address2, city from MyTable
    WHERE city IN  ('" & REPLACE(Parameters!City.Value ,",","','") & "')"
    In above expression: Replace will replace all , with ‘,’ and city IN (‘Hyderabad’, ‘Chennai’,
    ‘Delhi’) will not throw any error.
     Note: You have to write expression in one line in Expression editor for dataset
    query
    Thanks It is working fine but it is tough job if query is big.
    Hi S kumar,
    The above approach we use when we have source like DB2, becasue DB2 has some syntactical differences to pass multivalue paramaeter. I tested and it works good, if i am mentioning the query in above format by using Fx button while creating dataset.
    but if we want fetch data from view which exist in DB2 and we need to call db2 view in SSRS and pass multivalue parameter in a way we did above then could you please mention the steps and way to achieve this.
    Thanks in advance!

  • How to query the comma seperated values stored in Database

    Hi,
    I have a strange scenario, I am storing the specific data as a comma seperated value in the database. I want to query the DB with the comma seperated value as a Bind variable against the comma seperated value stored in DB.
    For eg : The data stored in DB has
    Row1 - > 1,2,3,4,5,6,7,8
    Row2 - > 4,5,6,7,8,9,10
    When I pas the Bind variable as '4,8' I should get Row1 and Row2 .
    Quick help his highly appreciated.. Thanks in Advance

    Oh, and if you actually wanted the data returned rather than just the row primary keys....
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as rw, '1,2,3,4,5,6,7,8' as txt from dual union all
      2             select 2, '4,5,6,7,8,9,10' from dual union all
      3             select 3, '1,6,7,9' from dual)
      4  -- end of test data
      5      ,r as (select '4,8' as req from dual)
      6  -- end of required data
      7      ,split_t as (select rw, regexp_substr(txt, '[^,]+', 1, rn) as val
      8                   from t, (select rownum rn from dual connect by rownum <= (select max(length(regexp_replace(t.txt, '[^,]'))+1) from t))
      9                   where regexp_substr(txt, '[^,]+', 1, rn) is not null
    10                  )
    11      ,split_r as (select regexp_substr(req, '[^,]+', 1, rownum) as val
    12                   from r
    13                   connect by rownum <= length(regexp_replace(req, '[^,]'))+1
    14                  )
    15  --
    16  select distinct t.rw, t.txt
    17  from   split_t st join split_r sr on (st.val = sr.val)
    18                    join t on (t.rw = st.rw)
    19* order by 1
    SQL> /
            RW TXT
             1 1,2,3,4,5,6,7,8
             2 4,5,6,7,8,9,10
    SQL>

  • How to look for a certain value in a database using sql

    Hello everyone. How do you do this in SQL? Or, is there a way to look for a certain value in a database? What I'm trying to do is this:
    I want to look for the exact value "abcdefg" in the database so that oracle will return me details on the following that contains the said value:
    1. the name of the table(s)
    2. the column/field name(s)
    Note: "abcdefg" could exist in different tables with different column names with different data types.
    Any help is much appreciated. Thanks.
    UPDATE: What about if I just want to check those fields/columns with string data types?
    Message was edited by:
    dongzky
    Message was edited by:
    dongzky

    Just a teeny tweek
    DECLARE
       l_dummy   VARCHAR2 (4000);
    BEGIN
       FOR rec IN (SELECT table_name
                     FROM all_tables)
       LOOP
          FOR rec2 IN (SELECT column_name
                         FROM user_tab_cols
                        WHERE table_name = rec.table_name)
          LOOP
             BEGIN
                EXECUTE IMMEDIATE    'select 1 from '
                                  || rec.table_name
                            || ' where to_char('
    || rec2.column_name
    || ') = ''CAS'' and rownum = 1'
                             INTO l_dummy;
                DBMS_OUTPUT.PUT_LINE (rec.table_name || ' ' || rec2.column_name);
             EXCEPTION
                WHEN NO_DATA_FOUND
                THEN
                   NULL;
             END;
          END LOOP;
       END LOOP;
    END;

  • How can I reduce the selection for the characteristics value in a BW query

    Good morning,
    I need to find out how I can reduce the selection for the characteristics values in a BW query.
    In a BW query I have a characteristic "Due month".
    The characteristic values shown in the query are from 01.2001->03.2007. I would like to reduce it to the last 2 years,in the query view,  without deleting the data for the other years in the cube.
    Do you know how this can be done?
    Thank you in advance for your feedback.
    Kind regards,
    Linda Verding
    Staff Consultant - CSC

    hi,
    First thing you have to do is check the report how the data is being restricted only to those months.
    1) one it can be variable in which the code is written for that to populate for last few years.
    or else it must have been hardcoded for these months.
    Go into your report and underneath the characteristicsCALMONTH there must be an variable or hardcoding.
    You need to change this here in the report.
    You dont have to delete anything there.
    Regards, Siva

  • Query security settings for users

    Hi again.
    I'm looking for a way of querying security settings for a user.
    ie I understand that company/division etc security is implemented through responsibilities.
    In which case, is there a way to retrieve those exclusions per user?
    (eg User 1 cant see company 50)
    Thanks,
    g.

    Hi again.
    I'm looking for a way of querying security settings for a user.
    ie I understand that company/division etc security is implemented through responsibilities.
    In which case, is there a way to retrieve those exclusions per user?
    (eg User 1 cant see company 50)
    Thanks,
    g.

  • Different variable values for same query inserted 6 times in One workbook.

    Hi,
    We have one workbook with the same query inserted on 6 different tabs (sheets in excel), a variable on Business Unit that is different for each tab.
    How can we control the variable input in BW2004s such that the different BU values are processed for each tab.
    At present the BU value input in the "variable pop-up screen" over rides all the fixed variables on the different tabs.
    Generous points will be awarded for useful solution.
    Thanks,
    Jasmine

    Hi,
    I am  trying to use filters for executing 2 queries in a Web App. I have 2 dataproviders (one for each query), and I am trying to use filters for say Version.
    The URL is
    /sap/bw/BEx?cmd=ldoc&TEMPLATE_ID=ZTW_XXX&DATA_PROVIDER_1= DP1&FILTER_IOBJNM_1=0VERSION&FILTER_VALUE_1=F01&DATA_PROVIDER_2= DP2&FILTER_IOBJNM_2=0VERSION&FILTER_VALUE_2=F02.
    This doesnot work. Both queries get filtered on both 'F01' and 'F02'.
    I am trying to filter DP1 by F01 and DP2 by F02.
    Any help is appreciated.
    Thanks,
    NS

  • Significant difference in response times for same query running on Windows client vs database server

    I have a query which is taking a long time to return the results using the Oracle client.
    When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
    When I run the same query on a Windows client it completes in 47 minutes.
    Ideally I would like to get a response time equivalent on the Windows client to what I get when running this on the database server.
    In both cases the query plans are the same.
    The query and plan is shown below :
    {code}
    SQL> explain plan
      2  set statement_id = 'SLOW'
      3  for
      4  SELECT DISTINCT /*+ FIRST_ROWS(503) */ objecttype.id_object
      5  FROM documents objecttype WHERE objecttype.id_type_definition = 'duotA9'
      6  ;
    Explained.
    SQL> select * from table(dbms_xplan.display('PLAN_TABLE','SLOW','TYPICAL'));
    PLAN_TABLE_OUTPUT
    | Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)|
    |   0 | SELECT STATEMENT   |           |  2852K|    46M|       | 69851   (1)|
    |   1 |  HASH UNIQUE       |           |  2852K|    46M|   153M| 69851   (1)|
    |*  2 |   TABLE ACCESS FULL| DOCUMENTS |  2852K|    46M|       | 54063   (1)|
    {code}
    Are there are configuration changes that can be done on the Oracle client or database to improve the response times for the query when it is running from the client?
    The version on the database server is 10.2.0.1.0
    The version of the oracle client is also 10.2.0.1.0
    I am happy to provide any further information if required.
    Thank you in advance.

    I have a query which is taking a long time to return the results using the Oracle client.
    When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
    When I run the same query on a Windows client it completes in 47 minutes.
    There are NO queries that 'run' on a client. Queries ALWAYS run within the database server.
    A client can choose when to FETCH query results. In sql developer (or toad) I can choose to get 10 rows at a time. Until I choose to get the next set of 10 rows NO rows will be returned from the server to the client; That query might NEVER complete.
    You may get the same results depending on the client you are using. Post your question in a forum for whatever client you are using.

  • Webdynpro abap-method for saving updated values in new database table

    Hi Experts,
    I am creating an ALV  application in weddynpro abap where i have given update button to update fields & save button to save values in mastertable,but whenever i am updating & saving ,it will overwrit previous values. For this,I need  to create a separate method to save the updated values of the fields in a new database table.
    Looking forward for solutions.
    Thank You!

    becuase of the below statement u r getting the error
    insert into ZTAB_CS_ISSSAL values Item_Dates.
    u declared the field Item_Dates as Stru_Issuesal-DATES
    and u were trying to inesrting the record in the table ZTAB_CS_ISSSAL with the field Item_Dates
    the error is related to the compatible.
    so declare work area for updating the table should be of type ZTAB_CS_ISSSAL.

  • Database cache settings for 4.13 on NT 4

    The database cache settings and the documentation have always been
    confusing.
    I have about 35000 entries in my directory. If I have enough available ram
    should I try to put all the entries into ram? The default setting is a 1000,
    should I change it to 35000? Will I notice any great speed increases.
    And the second setting has to do with index cache. Should I try to get that
    into ram also? My id2entry.db2 file is about 40MBs. Should I change the
    default from 10MBs to 40MBs? Will there be a significant increase in speed?
    Thanks.

    Thanks Russ H for your quick reply.  I am still fairly new to FCP X coming from using FCE not iMovie.
    The project I'm working on I had already started before posting yesterday.  Is it possible to change the settings for what I have already done, or no I need to start all over again?
    Thanks again
    Matt

Maybe you are looking for

  • Voyager SSAS 2005 SSO connection

    Hi, We are using BO Xi 3.1 and we have sso is configured for Infoview, now we are trying to configure SSO till database for Voyager (SSAS 2005), and we receieved the error message, We made change in the krb5.ini file with an entry of "forwardable = t

  • Rejected files missing

    Hi there, After finalizing an iMovie-project, I dumped rejected clips into the trash. During this process, I needed to restart iMovie as the program stopped responding. After restart, it appeard the movie is missing some files and shows black spots.

  • Playlist repeat problem

    If I set the 1 title on the iPod playlist to repeat, the title on the adjacent playlist (at least) seems to also get set to repeat. I've tried this several times all with the same result? Alternatively, I set the same title to repeat within the Windo

  • Analyzing tables

    What is analyzing of a table? How i can do it? What is the advantage of doing it? Please advice, Regards, Arun Kumar

  • Saving cards as pdf

    I'm trying to use a trick mentioned on the following web page to create a title graphic for an iMovie or iPhoto slideshow. But if I try creating a card and saving it as a PDF file, it always seems to be 72 dpi and I can't specify a specific number of