Precision Problem with CFQUERY

I have a column in Oracle which is a Number with precision
10, and scale 4.
Everytime I select anything from there from CF, it is
displaying all 4 decimals.
Say the number "1" is in one record, "2.2" is in the second
record, "3.0003" is in the third.
when I do a select all in a cfquery, I get:
1.0000
2.2000
3.0003
but if I were to select it in SQLPLUS, I get:
1
2.2
3.003
which is the result I desire. Why is Cold fusion adding zeros
to the cfquery? And how can I fix this?
Thanks,
boybles

Use
#val(your_col)# to display the result as you desire in the
output. It will "convert" your numeric "string" back to a number
and drop the trailing zeros.
Phil

Similar Messages

  • Precision problem with float

    Hi,
    I have class with an amount variable whose type is float. If a value like 999999.99 is set to this variable, when I try to display this in JSP, the precision is lost. It displays 1000000. But my requirement is to print 999999.99. Is there any to solve this problem? The constraint to this prioblem is I can't change the data type of this variable. (Actually this class is generated through Castor. The xsd type is float. I am not supposed to change the XSD).
    Please advise.

    There's nothing to be done about it if you can't change the data type. See for yourself:    System.out.println(999999.99F == 1000000F);  // yep, they are equalBlame the person who decided that you should use float.

  • Problems with cfquery

    I'm constructing a webform to take in information and store
    it to a Access database. The error that I've been getting has
    something to do with my Values after the INSERT INTO statement. I
    have been getting the same error for the past 3 days and I'm don't
    know what the problem could be.

    The web site you are accessing has experienced an unexpected
    error.
    Please contact the website administrator.
    The following information is meant for the website developer
    for debugging purposes.
    Error Occurred While Processing Request
    Error Executing Database Query.
    Syntax error in INSERT INTO statement.
    Resources:
    Enable Robust Exception Information to provide greater detail
    about the source of errors. In the Administrator, click Debugging
    & Logging > Debugging Settings, and select the Robust
    Exception Information option.
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
    SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
    Remote Address 127.0.0.1
    Referrer
    http://localhost:8500/test/webpage2.cfm
    Date/Time 26-Jul-07 01:44 PM
    Debugging Information ColdFusion Server Developer
    7,0,2,142559
    Template /test/actions.cfm
    Time Stamp 26-Jul-07 01:44 PM
    Locale English (US)
    User Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
    SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
    Remote IP 127.0.0.1
    Host Name localhost
    Execution Time
    Total Time Avg Time Count Template
    2874 ms 2874 ms 1 C:\CFusionMX7\wwwroot\test\actions.cfm
    266 ms STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN
    3140 ms TOTAL EXECUTION TIME
    red = over 250 ms average execution time
    Exceptions
    13:44:16.016 - Database Exception - in
    C:\CFusionMX7\wwwroot\test\actions.cfm : line 111
    Error Executing Database Query.
    This is my line 111:

  • Precision problem with illustrator CS5

    Hello,
    We have several licences of illustrator CS5 bought at the same time. When we import the same DXF or DWG file in different brand new computers (windows 7)
    equipped with CS5, on some of them we retrieve the perfect dimensions (for example 100mmX 50mm for a rectangle) and on some others  the dims are not correct (100.189 X 50.094).
    Please, have you got an idea of how to correct that or what must we check in the program setup.
    Thank you.
    Thierry

    Thierry,
    Before such drastic measures it may be worth trying to  Move the folder
    When you uninstall and reinstall, you should use the Cleaner Tool in between:
    http://www.adobe.com/support/contact/cscleanertool.html
    Without that, you may keep corrupt preference settings.

  • Problem with CFQUERY update statement

    I'm having trouble getting an SQL Update statement to work
    correctly and I'm scratching my head as to why.
    The output i get is the following:
    Syntax error in UPDATE statement
    SQLSTATE 42000
    SQL UPDATE companies SET CompanyName = 'Insight Data Ltd',
    Address1 = '5 Boulevard', Address2 = '', Address3 = '', City =
    'Weston-super-Mare', County = 'North Somerset', Postcode =
    'BS231NN', OfficeBranch = 'BR', contacttitle1 = 'Mr', contactname1
    = 'Andrew', contactsurname1 = 'Scott', contactposition1 = 'Owner',
    mail1 = 'yes', TelNumber = '01934 123456', TPS = 'no', FaxNumber =
    '',FPS = 'no',MobileNumber = '',MPS = 'no',email =
    '[email protected]', EPS = 'no', WebAddress = '
    http://www.insightdata.co.uk',
    contacttitle2 = 'Mr', contactname2 = 'David', contactsurname2 =
    'Lewis', contactposition2 = 'Office Manager', mail2 = 'no',
    contacttitle3 = 'Mr', contactname3 = '', contactsurname3 = '',
    contactposition3 = 'Owner', mail3 = 'no', contacttitle4 = 'Mr',
    contactname4 = '', contactsurname4 = '', contactposition4 =
    'Owner', mail4 = 'no', wPVCUfab = 'yes', wALUinst = 'yes', WHERE
    companyid = 33415
    VENDORERRORCODE -3503
    DATASOURCE idv6
    I've checked that all the data fields are in the correct
    format, and I can't see why I am getting a syntax error. Any help
    on this would be appriciated

    Agreed, but it looks like you already have the sql. Take the
    query from the error message above and run it in your database.
    Though I did notice have an extra comma between the last column and
    there WHERE clause.
    wALUinst = 'yes' , WHERE companyid = 33415
    For the optional columns, put the commas first to prevent
    errors due to trailing or too many commas
    UPDATE Table
    SET Column1 = 'value'
    <cfif SomeValueExists>, Column2 = 'other value'
    </cfif>
    WHERE ID = 123
    Two other things to consider: use cfqueryparam and consider
    normalizing your table. Column names like Contact1, Contact2,
    Contact3 ... are usually a sign its time to normalize.

  • Old problem with precision time counting and /usepmtimer solution.

    Hello, all!
    There was a problem in Windows XP and 2003 Server with using QueryPerformanceCouner() function. Sometimes it can cause problem with precision time measurements on CPUs which support powersaving modes by changing clock frequency. The simplest solution for that was /usepmtimer key in boot.ini file which forces the system to use another timer.
    I just want to know does this problem appear in Windoes 7? And how to solve it since there is no boot.ini file in Windows 7?
    Thanks a lot!
    P.S. This is a page with detailed description of the problem:
    http://support.microsoft.com/default.aspx/kb/895980

    Hi ,
    There is official documentation released on userpmtimer for windows 7 operating system.
    Also the KB article only refere to the OS which have performance problem.
    After reading the below article , i feel that this problem is taken care in windows 7 / windows 2008 ( though there is no formal written documentation )
    http://blogs.technet.com/perfguru/archive/2008/02/18/explanation-for-the-usepmtimer-switch-in-the-boot-ini.aspx
    you can post in windows 7 dedicated forum, so that MVP / Microsoft Engineers and community members would suggest you with latest data if any.
    http://social.technet.microsoft.com/Forums/en-US/category/w7itpro

  • I can not upgrade to quicktime 7.7.3 for windows vista.  Error message says there is a problem with the program installer.  Any clue as to how to get around this.

    I can not download quicktime 7.7.3 for windows vista.  The error message says that there is a problem with the windows installer.  Any clues?

    The error message says that there is a problem with the windows installer.
    What's the precise text of the message, please? (There's a few different ones I can think of that you might be getting.)

  • 1.5.1 - printing problem with HP DesignJet 90

    I made several 18" x 24" prints using 1.5 on the HP DJ 90 this morning and they printed fine, as they always have.
    After upgrading to 1.5.1, the first print ceased printing at 20", the next at 8".
    There were no other equipment changes before or after the upgrade.
    I reverted to 1.5 and the back-up Aperture library and the same image printed perfectly, suggesting there is a problem with 1.5.1 and the Hewlett Packard DesignJet 90.
    I will report this problem to Apple though Aperture software.
    PPC iMac G5, 2gHz, 2gB   Mac OS X (10.4.8)   10.4.8

    The page looks perfect in preview and as a PDF. I can't print from the PDF, however, because it shrinks the text and expands the margins ...
    Something's fishy. Save as PDF should result a file that looks exactly, precisely, like what you'd get if you printed directly to your printer.
    I suspect your Word document has been corrupted by a few bytes of random data that is causing your printer to go nuts. Try cutting that portion out of the document, and pasting it in a new blank document so you can incrementally isolate the damage.
    This isn't going to be as easy as it sounds, because when the PostScript printer driver encounters the errant code in the Word document, it's essentially telling the printer "now, go to the top of this page, print a nasty black smudge, and then crash." You might have to cut a whole page before and after the suspected corruption. If you're lucky you might be able to cut the portion then paste it right back as "unformatted text". Try that.
    BDAqua wrote:
    I'm not familiar with Word,
    We should all be so fortunate. Word does use the standard OS X Print dialog though.

  • [SOLVED] Problem with modules and udev

    Hi everybody,
    I've been configuring Arch on my new laptop the last few days and today as I was going to perform the first backup, I noticed that my external HDD does not show up in /dev/ when I plug it in. I figured it could be a problem with udev and the fact that in my /etc/rc.conf I use MOD_AUTOLOAD="no" with an explicit list of MODULES generated with hwdetect (as suggested in the wiki).
    To "solve" this I just changed MOD_AUTOLOAD to "yes" and after a reboot everything worked fine.
    My questions are:
    1) Is it possible to keep that feature (udev detects usb drives and creates the corresponding /dev/sdX) while having MOD_AUTOLOAD="no" ? What is/are the appropriate module(s) I have to put in my MODULES array ?
    2) What other such "basic" MODULES could be very useful that hwdetect does not tell about.
    Sorry for any English mistakes (I'm not a native speaker) and thank you in advance for your help,
    yms
    Last edited by yms (2010-01-06 12:48:20)

    1) Thank you, it works perfectly.
    2) Yes I know the question is weird. The thing is I have no precise idea at the moment and I just wanted to know if there are other very widely used features such as the one described in 1) that hwdetect ommits and that has to be loaded in MODULES.
    Anyway, thank you very much, I consider this matter [solved]

  • Having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this

    having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this.
    I'm using Lion on an MBP and Numbers is the latest version

    May you give more details about what is wrong with your dates ?
    M…oSoft products aren't allowed on my machines but I use LibreOffice which is a clone of Office.
    When I export from Numbers to Excel and open the result with LibreOffice, the dates are correctly treated.
    To be precise, dates after 01/01/1904 are correctly treated. dates before 01/01/1904 are exported as strings but, as it's flagged during the export process, it's not surprising.
    Yvan KOENIG (VALLAURIS, France) mardi 3 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Problem with BDC on VA02

    Hi All,
    I am facing a problem with bdc on va02. After hitting enter on the first screen it pops an info message "consider subsequent douments". It doesn't get recorded in recorded. Hence I am not able to run the transaction with no screen mode. Please help me to suppress the info message
    Navin

    Hi Navin,
    These kind of messages and pop ups are precisely the reason why use of BDC for updating transactions is NOT advisable.
    If you were to bypass such messages, you would have to put a check to see why the message appears (in this case probably because the sales document flow for the sales order in table VBFA has some documents) and then write a logic to either handle the message or not.
    Instead i would recommend you use the BAPI functions provided by SAP to change the sales order.
    Have a look the BAPI for sales order change attached to the business object BUS2012. For this goto transaction SWO1 and enter the BUS2012 business object. Then goto methods and look for the "change" method. Double click on the method and look at the BAPI used to implement the method. Go ahead and use this method in your program as against a BDC.
    I am sure it will be a much better option.
    Otherwise if you still want to proceed with a BDC, please debug at the point where the message/pop up appears to ascertain reason for the same and then incorporate the same check in your program to handle the pop up.
    Regards,
    Aditya

  • Problem with Date fields in Search panel

    Hi all,
    I use TP2 and in my jspx page I have a search panel with two date fields and table where the results is displayed. But there is a problem with these date fields, because when I search dates the results is nothing even I retype the date from table. Also I have other pages where this problem exist with same structure.
    Could somebody help me with some advice?
    Thanks in advance!

    Hi Frank,
    Thanks for the answer.
    I use the standart method to make search panel with drag and drop the data control to the page. The other search panel fileds work fine, only the date fileds are problem. Maybe something in view object doesn't work properly.
    Here I post the code from my page.
    <table border="1" style="margin:5px;">
    <tr>
    <td>
    <af:showDetailHeader text="ТЪРСЕНЕ" disclosed="true"
    inlineStyle="width:780px;">
    <table cellspacing="2" cellpadding="3" border="0">
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.EGN.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.EGN.inputValue}"
    label="#{bindings.EGN.hints.label}"
    columns="#{bindings.EGN.hints.displayWidth}"
    maximumLength="#{bindings.EGN.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.LNC.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.LNC.inputValue}"
    label="#{bindings.LNC.hints.label}"
    columns="#{bindings.LNC.hints.displayWidth}"
    maximumLength="#{bindings.LNC.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.AccPersonID.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.AccPersonID.inputValue}"
    label="#{bindings.AccPersonID.hints.label}"
    columns="#{bindings.AccPersonID.hints.displayWidth}"
    maximumLength="#{bindings.AccPersonID.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.PersonName.hints.label}"/>
    </td>
    <td align="left" colspan="5">
    <af:inputText value="#{bindings.PersonName.inputValue}"
    label="#{bindings.PersonName.hints.label}"
    columns="#{bindings.PersonName.hints.displayWidth}"
    maximumLength="#{bindings.PersonName.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.DateFrom.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateFrom.inputValue}"
    label="#{bindings.DateFrom.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateFrom.format}"/>
    </af:inputDate>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.DateTo.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateTo.inputValue}"
    label="#{bindings.DateTo.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateTo.format}"/>
    </af:inputDate>
    </td>
    </tr>
    <tr>
    <td align="right">
    <af:commandButton actionListener="{bindings.Execute.execute}"
    text="#{bundle.FindBtn_LABEL}"
    disabled="#{!bindings.Execute.enabled}"
    icon="/images/find.png"/>
    </td>
    <td align="left">
    <af:commandButton text="#{bundle.FindClearBtn_LABEL}"
    icon="/images/find_clear.png"
    action="#{PeopleBean.onClearVCBtn}"/>
    </td>
    </tr>
    </table>
    </af:showDetailHeader>
    </td>
    </tr>
    </table>
    Also I have a result table for the search panel, but I don't believe the problem can be there because it works fine when I search in fields different by inputDate.
    Do you have any suggestions?

  • 'Source play' and 'audio-video sync' problems with PE8 on fast WIN7 64 bit computer

    I am transferring Hi8 videos, about 2 hours long, to my WIN7 64 bit computer with PE8.  [Dell Mobile Precision M4400 Computer Workstation (Intel Core 2 Duo T9900 500GB/4GB); NVIDIA Quadro FX 770M, 512MB] I seem to have several problems: 
    First, after importing the file (.avi), I get a message about ‘dropped frames.’ 
    Secondly, when I try to play the video in the source monitor, the audio plays but the video doesn’t; it only shows the first frame [this is after waiting until the video is ?recognized? ]   I can use the shift-arrow key and see that the video is there.
    Thirdly, I can play the .avi file in other players, e.g., avidemux or PE pro CS5 on another computer.  There, I see that the audio and video are not in sync; the audio can be up to 300 ms ahead of the video (as determined using avidemux). 
    Questions:
    1.  Why doesn’t the source monitor play the video? Is this a problem with PE8 (latest update as of 3 March 2011) on aWIN7 64 bit computer (intel duo core. 3 GHz).
    2. Is the audio-video sync problem the result of the ‘dropped frames?’ How can PE8 correct this? Avoid this? Or, is it coincidence?

    "I think you're telling me you're using a backwards compatible Digital8  camcorder to capture your video as DV-AVIs. Is that right?" YES
    "Are you using  Premiere Elements to do this capturing?" YES, AS ABOVE PE8
    "Go to the File menu and select Properties. It should show a standard DV codec being used for your video and audio."
    WMP v12 is dumb. Under properties, media, it says 'video.'  However, avidemux gave me the information state above: video -- Codec 4CC: dvsd, frame rate: 29.971 fps; audio -- codec: PCM, channels: Stereo, frequency: 48 kHz.
    So, back to the Questions:
    1.  Why doesn’t the source  monitor play the video? Is this a problem with PE8 (latest update as of 3  March 2011) on aWIN7 64 bit computer (intel duo core. 3 GHz).
    2. Is the audio-video sync problem the result of the ‘dropped frames?’ How can PE8 correct this? Avoid this? Or, is it coincidence?

  • How to solve a serious problem with the Battary of my T500 laptop ?

    Hi Forum,
    My personal laptop is Lenovo THINKPAD T500 2055, and its main specifications are as follows:
    - 39T6651 SBB 9 CELL LI-ION BATTERY
    - Intel Core 2 Duo processor T9400 (2.53GHz 1066MHz 6MBL2)
    - 8 GB DDR3 SDRAM Memory Module 4 GB (2 x 4 GB) 1066MHz DDR31066/PC38500 DDR3 SDRAM SoDIMM Kingston.
    - 2 GB Intel Turbo Memory hard drive cache.
    - ATI Mobility Radeon 3650 with 256MB.
    - 160 GB Hard Disk Drive, 7200rpm.
    - Windows 7 Ultimate with the latest Service Pack (x64).
    My problem precisely and concisely is the Battary. I have been using my laptop with the same battary since 01.01.2009 (Almost 3.5 Years), and the battary has been working quite OK.
    Most of the time my laptop is plugged in and working with the electricity. However, A very few times I used the laptop while it is running on battery, Nevertheless, I have the habit to empty the batter once in a while i.e. Every 3 weeks, I unplug the charger and keep using the laptop till I see the warning orange sign (5%), then, I plug it in again.
    Thankfully, I never had any problems with the battary nor the laptop, and when I charge the laptop usually it shows full sign (100%).
    Three days ago, All of a sudden my laptop starts flashing the orange battary sign constantly while charge indicates 100%. When I try running on the battery by unplugging the AC adapter, the laptop loses power immediately and shuts down right away.
    What do you think should I do? Could you please provide me any useful tips to resolve this problem?
    I would greatly and sincerely appreciate all your inputs !
    Thanks for your consideration of my request, and I very much look forward to hearing from you at your earliest convenience !
    Solved!
    Go to Solution.

    In the control panel goto the "Lenovo - Power Manager" and click the battery tab, there is a maintenance button in there that will let you change the charging profile for your battery.   (from memory, so exact wording may be off)
     The lower the numbers you use there, the longer the battery *should* last.    These batteries degrade faster at higher charge levels, however storing them at too low of levels is also not good for them... I've read that 40% is optimal, but just not realistic if you use your computer.
    --- ThinkPad T61 / Win 7 / Core 2 / 4gb RAM / Nvidia / Still used daily --- ThinkPad Edge 15/ i5 / Win 7 / TrueCrypt / 8gb RAM / Hated it, died at 1 yr 1 mo old --- ThinkPad T510 / Win 7 / TrueCrypt / i5 / 8gb RAM / Nvidia / Current primary machine --- ThinkPad X220 / i7 / IPS / 4gb / TrueCrypt / My Road Machine

  • "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows 7 64bit

    I was promted to upgrade to the new itunes version today (11.0.2.26), but wish I never had as the previous version worked just fine!! I have been unable to install the new version and keep getting the message about there being a problem with the Windows Installer package. I tried following the instructions on this support pages on removing all Apple programs but that didn't work either!! I have Windows 7 64 bit and am close to throwing my PC out of the window!! Quicktime will not re-install correctly either...
    Any suggestions will be most gratefully received

    Just in case, let's try a standalone AppleSoftwareUpdate.msi install.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe, and select "Extract to iTunesSetup". WinRAR will expand the contents of the file into a folder called "iTunesSetup".
    Go into the folder and doubleclick the AppleSoftwareUpdate.msi to do a standalone ASU install.
    (If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleSoftwareUpdate.msi again.)
    Does it install (or uninstall and then reinstall) properly for you? If not, what error message do you get? (Precise text, please.)

Maybe you are looking for

  • CS4 Master Collection wont install on Vista Ultimate 64-bit.

    Im using my friends cs4 disc's wich he doesent use any more (switched from windows to mac) and it wont install full quality image atached if you cant read this one.

  • Minimum order quantity for sales orders

    Hi, I need to check the configuration settings where the sales orders can be blocked if the ordered quantity is less than that of minimum order quantity. Pls threw some light on this. Points assured Kitty

  • PDF Security II

    Hello all, I was reading a post about pdf security and the following script, created by Mike Brog, was mentioned. However, I do not know how to modify it to work for me. I am very new to scripting. Some of the elements look familiar to me, but I stil

  • Hii  purchase infor record when creating PR from a sales order

    Hii I have found an exit USEREXIT_MOVE_FIELD_TO_ME_REQ when creating a sales order i can modify the table EBAN there is a special flow where i need to remove clear out the Purchase info record (INFNR) since when creating a sales order the purchase de

  • Trouble browsing

    For some reason, I can't seem to get on half the websites I goto when I'm at work.  But when I take my computer home, it works without any trouble at all. I have tried changing from safari, to firefox and have tried using both hard wire and wifi.  Th