Jump to content

CaesarII

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by CaesarII

  1. i've come up with a soloution, it isen't the most elegent, but it woks. In the XML document i added a secondn item price to the affected calculation which was "-0.000000000001"
  2. I’ve come up with the following:select VIDEO_CARD.NO_OF_COPIES from VIDEO_CARDDECLARE NUM (number ="0");BEGINIF VIDEO_CARD.NO_OF_COPIES > NUM THENgo_block('Rental_Card');ELSEgo_block('reservation_card');end if;end; however whenever i try and compile it, it comes up with error 103
  3. In regards to the DVD database in my earlier post, I’m trying to create some code that will cause a button on the main menu to go to one data block if the number of copies of a dvd is above 0 and another data block if the number of dvd's is 0. I was thinking about something along the lines of; select VIDEO_CARD.NO_OF_COPIES from VIDEO_CARDBEGIN WHERE VIDEO_CARD.NO_OF_COPIES > 0go_block('Rental_Card')OTHERWISEgo_block('reservation_card')end/ Any help would be appreciated
  4. Changing the formula to fit my precise table and field names is going well (however oracle doesn’t seem to like timestamp), I’m off home for the evening and I’ll continue more tomorrow
  5. This is what i have so far; if (date returned < date out) { SELECT DATEDIFF (day,'RENTAL_CARD.TEXT_ITEM_DATE_RETURNED',''RENTAL_CARD.TEXT_ITEM_DATE_RETURNED') AS DiffDate*2; };
  6. I’ve figured out why the first calculation was wrong, I’d entered the information wrong. However the second calculation, the one with "000000000001" at the end of it, is still incorrect, I’ve also discovered that this calculation goes wrong at between 0.45 & 0.46 (with the total being 74.49000000000001)
  7. whilst helpfull and gave me other ideas it did not help me solve my original problem, thanks though
  8. Hello all, I’m using oracle 10g forms builder to create dvd rental system, the problem I’m having is calculating the overdue fine. I already have the date the dvd is rented out, $$date$$, and the date due, sysdate + 7 (i.e. 7 days after date out), i however as perversely stated have no idea how to calculate the fine (which is charged at £2.00 a day) and any help would be appreciated. Thanks, CaesarII
  9. The following code is a snipit of my xml code in case its useful <invoice> <item_id>11224432</item_id> <name>Toshiba Laptop</name> <photo> <img src="images/Laptop.jpg" /> </photo> <item_price>125.00</item_price> <price>125.00</price> </invoice>
  10. Hi I'm attempting to use XSL to caluclate the grand total for two invnoices, whilst the calculation provides a number, on the first invoice's grand total, the number is off by 0.05 and on the second invoice there is "000000000001" after the correct first two decimal places. This is the XSL code I'm using to make the calculation:<td style="text-align:center;"> <strong><xsl:value-of select="sum(//item_price)" /></strong> </td> CaesarII
×
×
  • Create New...