I want to float...s

Hi all
I have seen web page where both images and text seem floating or are sitting on top of the page. It looks as if they are on another layer. can someone give me a simple example of how this is done.....
thanks for any help you can give Graham

Thanks for taking the time to reply....
But the site you told me about is really just setting the background. What I am really talking about is something like the scripts that put snow flakes that float down the page .....

Similar Messages

  • Question about clearing floats....

    I have a three-column layout where (from left to right)
    columns 1 & 2 are
    floated left and column 3 is floated right. Works great...
    what heppens
    when, within the middle column I have the following:
    <div id='container'>
    <img ....>
    <p> blah blah blah</p>
    </div>
    I want to float the image to the right, so the text wraps
    around it but I
    also want to put the following as the last line of the
    "container" div:
    <div style='clear: right;'>&nbsp</div>
    problem is, this last line will clear the ENTIRE right column
    from the main
    page layout. Ahhhh. Can't I somehow clear things relative to
    the column
    and not the whole page?
    Alex

    From the description you have supplied to date this is what I
    am
    getting. Neither clear: right; or clear: both; result in the
    issue you
    describe, so something else on your page is causing issues.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    #one, #two {
    width: 250px;
    float:left;
    #three {
    float: right;
    width: 250px;
    #two img {
    float: right;
    </style>
    </head>
    <body>
    <div id="one">One</div>
    <div id="two">
    <img src="images/logo.gif" width="100" height="100">
    <p>blah blah blah blah blah blah blah blah blah blah
    blah blah blah
    blah blah blah blah blah blah blah
    blah blah blah blah blah blah blah blah blah blah blah blah
    blah blah
    blah blah blah blah blah blah blah blah blah blah</p>
    <br style="clear: both;"></div>
    <div id="three">Three</div>
    </body>
    </html>

  • Fixed div that floats right works fine in IE but floats left in other browsers

    I have a div that I want to float right and have remain in that position as a user strolls down the screen. I set the position to fixed which works fine in IE8 but when I view it in other browsers (chrome, safari, firefox) the div does stay in position but it floats to the left.
    I believe it's just a simple setting that I'm not familiar with.
    Thanks for your help in advance.

    You can't float a fixed division. Use margins instead.
    http://alt-web.com/DEMOS/CSS2-Sticky-Text.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Storeing values in floate data type upto two decimal places

    Hi
    I want a float type field in my table but want to store value up to two decimal places.
    so what syntax i need to follow plz suggest.
    thanks

    it is not possible to store with Number datatype. if you are using the data to sho report, then change its format (like 45 to 45.00). if you want to store 45.00 in database, then you have to modify the datatype for that column. for this follow the following path
    1. Add a column of datatype Varchar2.
    2. Copy all the value of your number field to it.
    3. Drop the old column.
    4. However make sure that if you have used that column somewhare in arithmetic calculation, the modify it and use to_number function to do arithmetic opration.

  • Floating Fields

    I am trying to add a Floating Field into the body of some text on my form.
    This field will simply add the first name of the customer into the text paragraph.
    When I select the location where I want the field and insert it, {TextField} appears.
    I then create another text field (also named TextField) on the form that I want to link to this one.
    However, the customer's name never appears into the floating field.
    Is there a proper way to link them?
    Thanks,
    MN.

    If I understand correctly, you want the floating field to reflect what someone has typed in a field somewhere else? So if they type in their name as Hubert, when they scroll down the floating field will also show Hubert?
    If that's correct, then I don't think it can be done, as floating fields are basically variables in static text, and I don't think static text can dynamically change like that after the form is rendered. Floating fields need to be bound to some data source (ie: xml data, or database) where the value is available before the form is rendered.
    You could probably do what you want using a Text Field instead of a floating field, but you wouldn't be able to inbed the Text Field in static text (though you may be able to design it so that the user doesn't realize this).
    H.

  • Problem clearing floats

    Here is an interesting problem. My page has a left sidebar, which is obviously floated left. In the main part of the page, I want to float an image so the descriptive text will be next to it rather than below it. I have multiple images to do this with. So, if I try and clear the left float, the images nest to the right of the previous image, crowding up underneath the text. This is not desirable. If I clear the left float, it puts the next image at the bottom of the left sidebar, also not desirable. Only the footer should go below the left sidebar. I have checked in a css book, it gives a couple ideas, but they don't work as their examples are not for nested floats like this.
    Any ideas? Here is the page: http://www.hainingfamily.com/media.php
    Thanks,
    Mike

    Include your anchor within the <div> too. Ive renamed the <div> class 'pictureLink'
    <div class="pictureLink">
    <img src="images/TheHainingFamilyPromoPic.jpg" alt="color picture" width="90" height="60" />
    <a href="images/thehainingfamilypromopic.jpg" target="_blank">Color Picture in jpg format (546KB)</a>
    </div><!-- end pictureLink -->
    <div class="pictureLink">
    <img src="images/TheHainingFamilyPromoPic.jpg" alt="color picture" width="90" height="60" />
    <a href="images/thehainingfamilypromopic.jpg" target="_blank">Color Picture in jpg format (546KB)</a>
    </div><!-- end pictureLink -->
    Then use this css to 'clear' and 'flloat' the image left.
    .pictureLink {
    width: 280px;
    overflow: hidden;
    margin: 0 0 10px 0;
    .pictureLink img {
    float: left;
    No need then for your <br class="clrlft" />. Overflow: hidden; on the .pictureLink <div> forfills that purpose and makes the code cleaner and easier to manage.

  • F suffix for floating point.

    Okay, I'm a proficient c++ programmer and have been learning Java for only a few weeks now.
    I have a question about the f suffix for floating point varibles such as float f = 3.14f;
    The f suffix casts this as float right? which is the same as float f = (float) 3.14; Correct?
    Why do we have to add the f suffix in the first place? Doesn't the compiler know that we want a float and not a double? (single-precision 32-bit instead of double precision 64 bit) I really do not understand the concept here or why they need the f suffix.
    Can someone explain?

    ThePHPGuy wrote:
    The f suffix denotes that the literal is of a floating-point type.Yes. The d suffix does the same.
    Java has two different types of floating-point numbers.Right.
    The type double is the default type.Right.
    The float type can have a double and a float literal. Is this true or false?No. At least not in any way I understand it.
    I think you're confusing two things:
    "floating point number" is any number in the IEEE floating point format.
    "float" is a datatype holding a 32bit floating point number.
    "double" is a datatype holding a 64bit floating point number.
    floating point number literals can be either double literals (without suffix or if the "d" suffix is used) or float literals (when the "f" suffix is used).

  • "Floating" a movieclip

    Real quick,
    Does anyone have any ideas as to how to make a movieclip
    appear to float in the air? I want it to stay within... say 40
    pixels of its original x and y coordinates. I'm just not that good
    at making visual effects, I'm more into data integration. Thanks!
    Sam

    hey, i just signed up and posted my own question, so i
    thought that in the spirit of reciprocity, i'd try and answer a
    few....
    place this code on the first frame of the movie that you want
    to float:
    var xMin:Number = this._x - 10
    var xMax:Number = this._x + 10
    var yMin:Number = this._y - 10
    var yMax:Number = this._y + 10
    var tSec:Number = 1 //number of seconds for the tween to
    take, and how often to start a new tween
    var me:MovieClip = this
    function newTween(){
    //adjust the easing class as needed
    //see the different easing classes at:
    http://www.actionscript.org/tutorials/advanced/Tween-Easing_Classes_Documented/index.shtml
    var xNew:Number = (Math.random()*(xMax-xMin)) + xMin
    var yNew:Number = (Math.random()*(yMax-yMin)) + yMin
    xTween = new mx.transitions.Tween(me, "_x",
    mx.transitions.easing.Regular.easeInOut, me._x, xNew, tSec, true)
    yTween = new mx.transitions.Tween(me, "_y",
    mx.transitions.easing.Regular.easeInOut, me._y, yNew, tSec, true)
    var IntID:Number = setInterval(newTween,tSec*1000) //use
    IntID to clear the interval later if needed
    hope that helped

  • Divs being removed from parent div when a float style is applied

    Divs being removed from parent div when a float style is applied
    Hi All,
    I hope someone is able to help me with the below issue.
    I apologise if the questions I have been asking lately are really basic, I’m just teaching myself web design.
    I really do appreciate the help you guys offer, so a big thank you in advance.
    I am confused as to why I am not getting my desired effect for the below code. I am creating a website for someone and have structured the website in the following way:
    <body>
    <div id="wrap">
    <div id="title"></div><!-- end #title -->
    <div id="shopping_cart"></div><!-- end #shopping_cart -->
    <div id="content_wrap">
    <h2 class="header">Header goes here</span></h2>
    <div id="nav_bar">
    <table>table goes here</table>
    </div><!-- end #nav_bar -->
    <div id="side_bar">
    <h1>text here</h1>
    <table>table goes here</table>
    </div><!-- end #side_bar -->
    <div id="content">
    <p>text here</p>
    <div id="content_image"></div>
    </div><!-- end #content -->
    <div id="footer">
    <div id="logo"></div>
    <div id="flags"></div>
    <div id="v_wd"></div>
    </div><!-- end #footer -->
    </div><!-- end #content_wrap -->
    </div><!-- end #wrap -->
    </body>
    Now I don't know if I am structuring my website the right way this is just the way that makes sense to me. It might not even be the source code that’s the issue and may be the CSS so I have also pasted that in below.
    Now the problems I am having are as follows:
    I want to have my whole site wrapped in one big div #wrap so I can centre the whole site. Within that div I want all my other divs (which some have divs inside those as well).
    To start #title seems to fit inside #wrap without a problem but #shopping_cart gets push outside of #wrap even though it is inside the opening and closing #wrap tag.
    My next div #content_wrap, it seems to be inside #wrap however the margin-top I have applied to #content_wrap pushes it down from #title not #shopping_cart even though #content_wrap is below #shopping_cart not #title.
    The second problems seem to be with the divs that are or supposed to be inside #content_wrap.
    h2 .header seems to fit inside #content_wrap without any problems. Now it gets really confusing, for me anyway. Any div I put below h2 .header which is inside #content_wrap doesn’t seem to actually go inside #content_wrap or #wrap they get pushed below #wrap even though in the source code they are inside the opening and closing div tags.
    Also #side_bar and #content together equal 860px which is the width of their surrounding div #content_wrap so they should fit perfectly side by side. This I know ties into a previous discussion I raised in discussion (http://forums.adobe.com/message/4501038#4501038). I have taken Murry’s advice on board from this discussion and tried floating just #side bar to the left and left enough margin for #content to clear, I also tried floating both to the left. Nothing worked.
    As I have been writing this I’ve gone through my code, all the above issues only occur if I float a div. If I float a div for some reason it removes that div from any div surrounding it and pushes it below every single div. I don’t know how to position my divs in the exact place I want without floating them but if I float they get moved out of their parent div and therefore aren’t in the position I want them in either.
    If you are able to help me resolve this issue it will help me with all future projects. I really do appreciate any help you can give.
    Kind Regards
    Elliot
    CSS
    I have marked out where I would float a particular div */style*/ which I know would cancel that style. Therefore the problems I am having are with divs #shopping_cart, #side_bar and #content.
    body {
    background:url(images/body_bg.png) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;}
    #wrap {
    height:auto;
    width:895px;
    margin:0 auto;}
    #title {
    Background-image:url(images/title.png);
    height:67px;
    width:895px;
    margin-top:50px;
    margin-left:auto;
    margin-right:auto;}
    #shopping_cart {
    background: url(images/shopping_cart.jpg);
    height:46px;
    width:142px;
    margin-top:15px;
    margin-right:25px;
    /*float:right;*/}
    #content_wrap {
    background:url(images/content_bg.png) repeat;
    border:2px solid #666;
    height: auto;
    width:862px;
    margin-top:15px;
    margin-left:auto;
    margin-right:auto;}
    #nav_bar {
    width:809px;
    height:59px;
    margin-left:26px;}
    #side_bar {
    height:auto;
    width:285px;
    margin-top:20px;
    border-right:1px solid #666;
    /*float:left;*/}
    #content {
    height:auto;
    width:575px;
    margin-top:20px;
    /*float:left;*/}
    #content_image {
    background-image:url(images/couple.jpg);
    height:184px;
    width:271px;
    margin:0 auto;}
    #footer {
    background-color:#0F0;
    width:860px;
    height:200px;}
    #kejo_logo {
    background-image:url(images/kejo.png);
    height:100px;
    width:227px;}
    #flags {}
    #viscari_wd {}
    #copyright {}
    #pp_tu {}
    .header {
    color: #FFF;
    font-size:44px;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    margin-left:10px;}
    .header_small {
    color: #FFF;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 25px;
    margin-left:10px;}
    #content_wrap #side_bar h1 {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    color: #4b4a4a;
    font-size:20px;
    padding-left:15px;}
    #content_wrap #content p {
    color: #484747;
    text-align:center;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size:20px;
    padding-right:15px;}

    Hi guys,
    Thanks for your help but still having a few problems;
    In design view the code you advised I should add seems to have placed #shopping_cart back into #wrap under #title and above #content_wrap but hasn't when previewed in browser as there is no margin between #content_wrap & #shopping_cart.
    #side_bar and #content now seem to sit side by side each other fine in design view and in the browser, however #footer which is in #content_wrap but under #side_bar and #content is behind #side_bar and #content. How do I get #footer to position under #side_bar and #content?
    I have added a green background to #footer to make it stand out. I have also added two images one of the site in design view and one previewed in the browser so you can see the difference. I've also pasted the amended code.
    Again thanks for your continued help and advice.
    <body>
    <div id="wrap">
    <div id="title"></div><!-- end #title -->
    <div id="shopping_cart"></div><!-- end #shopping_cart -->
    <div id="content_wrap">
    <h2 class="header">Header goes here</span></h2>
    <div id="nav_bar">
    <table>table goes here</table>
    </div><!-- end #nav_bar -->
    <div id="side_bar">
    <h1>text here</h1>
    <table>table goes here</table>
    </div><!-- end #side_bar -->
    <div id="content">
    <p>text here</p>
    <div id="content_image"></div>
    </div><!-- end #content -->
    <div id="footer">
    <div id="logo"></div>
    <div id="flags"></div>
    <div id="v_wd"></div>
    </div><!-- end #footer -->
    </div><!-- end #content_wrap -->
    </div><!-- end #wrap -->
    </body>
    CSS
    body {
    background:url(images/body_bg.png) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;}
    #wrap {
    width:895px;
    margin:0 auto;
    overflow:hidden;}
    #title {
    background:url(images/title.png);
    height:67px;
    width:895px;
    margin-top:50px;
    margin-left:auto;
    margin-right:auto;}
    #shopping_cart {
    background: url(images/shopping_cart.jpg);
    height:46px;
    width:142px;
    margin-top:15px;
    margin-right:25px;
    float:right;}
    #content_wrap {
    background:url(images/content_bg.png) repeat;
    border:2px solid #666;
    width:862px;
    margin-top:15px;
    margin-left:auto;
    margin-right:auto;
    overflow: hidden;
    clear: both;}
    #nav_bar {
    width:809px;
    height:59px;
    margin-left:26px;}
    #side_bar {
    height:auto;
    width:285px;
    margin-top:20px;
    border-right:1px solid #666;
    float:left;}
    #content {
    height:auto;
    width:575px;
    margin-top:20px;
    float:right;}
    #content_image {
    background-image:url(images/couple.jpg);
    height:184px;
    width:271px;
    margin:0 auto;}
    #footer {
    background-color:#0F0;
    width:860px;
    height:200px;}
    #kejo_logo {
    background-image:url(images/kejo.png);
    height:100px;
    width:227px;}
    #flags {}
    #viscari_wd {}
    #copyright {}
    #pp_tu {}
    .header {
    color: #FFF;
    font-size:44px;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    margin-left:10px;}
    .header_small {
    color: #FFF;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 25px;
    margin-left:10px;}
    #content_wrap #side_bar h1 {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    color: #4b4a4a;
    font-size:20px;
    padding-left:15px;}
    #content_wrap #content p {
    color: #484747;
    text-align:center;
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size:20px;
    padding-right:15px;}

  • Floating item - help

    I'll try my best to describe what I am trying to do... I want
    to FLOAT and leaf image right over the top of where 2 TDs come
    together. I am trying to use a <div> tag which works fine,
    except for one problem it is creating. No matter how I do it, it
    somehow makes the TD on the bottom have too much height. I am
    trying to use CSS with these parameters.
    .mapLink {
    position: relative;
    top: -200px;
    right: 20px;
    float: right;
    What do I need to add to keep it from blewing up the bottom
    half of the page?
    here is a link to the pages:
    http://www.gulfnetwork.com/gcmccc/locations.htm

    Thytar wrote:
    > Ok... It works in IE... but not in Firefox? How do I
    make it work in Firefox
    Surround your main table in a <div>
    <div id="tableContainer">
    <table width="877" border="0" align="center"
    cellpadding="0"
    cellspacing="0" class="tableBorderDkGreen">
    blah blah blah
    </table>
    </div><!-- end tableContainer -->
    Then give it some css:
    #tableContainer {
    position: relative;
    width: 877px;
    margin: 0 auto;
    (dont use a <p> tag to try and position the leaf use a
    <div> instead.
    Insert the 'mapLink' <div> inside the "tableContainer"
    <div>
    So you have the following structure:
    <div id="tableContainer">
    <div class="mapLink"><img src="images/leaf1.png"
    alt="Map Link"
    width="100" height="73" /></div>
    <table width="877" border="0" align="center"
    cellpadding="0"
    cellspacing="0" class="tableBorderDkGreen">
    blah blah blah
    </table>
    </div><!-- end tableContainer -->
    Now use absolute positioning on the mapLink <div> (mess
    around with the
    x, y co-ordinates until you have it in the position required.
    .mapLink {
    position: absolute;
    top: 200px;
    left: 20px;
    This is probably the best way to do it to get consistent
    results
    cross-browser. Using relative positioning in combination with
    float and
    minus margins is a disaster waiting to happen. You might
    achieve utopia
    in one browser but its likely to be out in another.

  • Need help with a few things in Photoshop CS4

    1) When I change a photo, I click to save, up pops the JPEG Options box, which has been set to 12 since last year. Today, it suddenly changes itself to 6 for no good reason. Each and every photo I change, I have to now tell it 12, not 6. How do I get it back to 12, and get it to stay there??? How/why did it change itself in the first place?
    2) How can I view photos and select the ones I want to go to the lab? In previous CS versions, I could view large thumbnails, and use the flag feature. I can't seem to find out how to do that, within Bridge.
    3) When I pull a lot of photos up, say 50, in Photoshop, and try to float them all to view them, it won't let me, says I have too many windows open, and to close some so it can float the remaining ones. This is retarded. Without floating, the images numbers are all stuck together in a line on that top bar, and I have to click each number to see the image, but I can only see maybe 6 images total, unless I close them one by one, which is then replaced with a different image. Any suggestions on how to undo this feature altogether? I always love "new features" that makes everything 20 times as hard as it was before. Great thinking.
    Thanks.

    For #2, adjusting the size wasn't the problem. It was flagging them to sort them. I found out that in CS4, it has a different name other than flagging.
    For #3, I have tons of memory. 4 gb on a quad core computer. It's maddening that when the images are open, they're in those stupid boxes, very hard to work with. Free floating is so much easier. But if I say to float them, it won't. It just says too many are open. Well, they're ALREADY open. I just now want to FLOAT them. But it won't do it. Maybe if I have 20 or 30 open, then it'll float them.

  • Randomly Apple TV can't play Movies/Tv shows and music.

    I've seen other people having problems with this issue but with all my searching, have not found an answer and thought I'd share my experience in case someone has a solution or suggestion.
    Our cable modem service comes into an access pannel in the bedroom closet. It goes to the Linksys WRT54G router, then to a hub which sends out to all the rooms in our house. Our house is new and pre-wired for ethernet in each room. It comes in the office, goes into another hub and then to the Mac Mini I have and to a NAS Lacie storage drive where all my movies, music and photos are at. We stream everything and only synk photos on the Apple TV.
    Over the last couple of days, the Apple TV can't play movies or music for some reason. The errors I get with Movies/TV is "The selected video cannot be played." The format was not recognized. With music the message is "Apple TV cannot play the current song." I know all the movies and music work because a day before I just played I AM LEGEND and it worked perfectly.
    I've got a couple of theories and wanted to float them by everyone. I use a Harmony 880 remote and when I select Apple TV, it turns on the ATV and then sets the inputs on the other items. When I'm done and select watch TV, it turns ATV off. Should the ATV stay on all the time? Could this be causing the problem?
    I've restarted the ATV, the Mac Mini, the hubs, the cable modem, the router. Nothing brings it back. But if it sits for a while, a couple hours or so, then it's back. However, it just stops playing for no reason and the next day it might not work again.
    I'm running iTunes 7.6.2 and I checked the ATV and iTunes and both say they are up to date on their software.
    I could really use some help here. The frustrating part is the kids want to watch one of their movies for the 700th time and it won't play many time.
    Thanks everyone.
    John
    I use a Harmony 880 (I believe) remote.

    Oops----thinking of the light on the Airport!!! =-)
    The status light is gray, so it is not setting off any "alarms", everything else is working, but when I go to watch a movie, rented or owned, it times out and resets itself. I ran a diagnostic and it said everything was working properly, I reset to factory settings and still had the same problem, and even reset the Airport to make sure it was not just the connection.
    At a complete loss as to any other ideas to try to get her up and running again. No way am I going anywhere near an Apple Store with all the iPad hype that is out right now!!!!!!

  • Help with ORA-01403: no data found please.

    First off I'd like to apologise for my lack of PL/SQL experience, what follows may seem naive, but I guess we all have to start somewhere.
    I'm trying to create a function which determines an employee's Annual Holiday Entitlement by comparing their length of service against a lookup of entitlement values. Due to the complexity of the application I'm targeting there are a number of other factors to be take into consideration, but this is the basic idea of what I want to achieve.
    I've started by taking a working SQL Server 2005 function and converted this using the translation scratch pad in SQL Developer 1.5.1 I'm now hand cranking the subtleties into the script but when I debug the code I'm getting "ORA-01403: no data found" at almost every SELECT. In fact the only successful select is from the ABS_SYSTEM_CONTROLS table. I can handle the first few failures by setting default values in the variables that I'm trying to load, but this isn't an option when it comes to selecting the DATE_OF_START from the PERSON table.
    I've sure I've probably made some fundamental error, but can't spot it myself. Any help would be most welcome.
    I've included the entire script below for your entertainment ;-)
    Thanks
    Phil.
    create or replace
    function mygetannualholidayentitlement
    ( v_empNo in varchar2
    , v_inputDate in DATE
    ) return number as
       -- Declare variables here
       v_entitlement FLOAT(53);
       v_holidayPlan VARCHAR2(20);
       v_contServiceOption VARCHAR2(255);
       v_postNo CHAR(16);
       v_lengthOfService NUMBER(10,2) ; -- Need to give this a default value else the CURSOR (below) won't initialise.
       v_empStartDate DATE;
       -- Load up our loacal variable for each row in the loop and the final value is the one we want.
       v_selectedLOF FLOAT(53);
       v_selectedDateEffective DATE;
       v_selectedAmount FLOAT(53);
       v_effectiveDate DATE;
       -- Cursor declaration
       -- Holiday plan details are also keyed on DATE_EFFECTIVE.  Need to identify which row is active as at our @effectiveDate.
       CURSOR holDefCursor
         IS SELECT length_of_service,
       date_effective,
       amount
         FROM holiday_plan_def
          WHERE hplan_code = v_holidayPlan
         AND length_of_service < v_lengthOfService
         ORDER BY date_effective ASC,
       length_of_service ASC;
    BEGIN
       -- Initialise variables --
       -- truncate any hours/Mins & secs from effective date
       v_effectiveDate := trunc(v_inputdate);
       v_entitlement := 0;
       v_contServiceOption := 0;
       v_lengthOfService := 0;
       BEGIN
       SELECT HPLAN_CODE
         INTO v_holidayPlan
         FROM APPT_HOLIDAY_BALANCE
          WHERE emp_no = v_empNo
                  --          post_no = @postNo and
                  AND ( v_effectiveDate BETWEEN HOLIDAY_YEAR_START AND HOLIDAY_YEAR_END );
       EXCEPTION
       WHEN NO_DATA_FOUND THEN
          v_holidayplan:=NULL;
       WHEN OTHERS THEN
           raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
       END;
       -- Still no hoildayPlan? Then use the default plan code from ABS_SYSTEM_CONTROLS.
       IF v_holidayPlan IS NULL THEN
          SELECT HPLAN_CODE
            INTO v_holidayPlan
            FROM ABS_SYSTEM_CONTROLS ;
       END IF;
       BEGIN
        SELECT OPTION_VALUE
          INTO v_contServiceOption
          FROM PS_OPTIONS
           WHERE OPTION_NAME = 'CONTINUOUS_SERVICE_OPTION';
       EXCEPTION
       WHEN NO_DATA_FOUND THEN
          v_contServiceOption := 'N' ;
       WHEN OTHERS THEN
           raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
       END;
       IF v_contServiceOption = 'Y' THEN
       BEGIN
          -- Need to take into account the employees CONTINUOUS_SERVICE_DATE when calculating length of service
          BEGIN
          SELECT CONTINUOUS_SERVICE_DATE
            INTO v_empStartDate
            FROM person
             WHERE emp_no = v_empNo;
          EXCEPTION  
            WHEN NO_DATA_FOUND THEN
              v_empStartDate := NULL;
            WHEN OTHERS THEN
              raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
          END;
          -- If we can't get a CONTINUOUS_SERVICE_DATE we will fall back to PERSON.DATE_OF_START
          IF v_empStartDate IS NULL THEN
          BEGIN
             SELECT DATE_OF_START
               INTO v_empStartDate
               FROM PERSON
                WHERE emp_no = v_empNo;
          EXCEPTION  
            WHEN OTHERS THEN
              raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
          END;
          END IF;
       END;
       ELSE
       BEGIN
          -- Need to use employees DATE_OF_START when calculating length of service
          SELECT DATE_OF_START
            INTO v_empStartDate
            FROM PERSON
             WHERE emp_no = v_empNo;
       END;
       END IF;
       -- Now we can get length of service
       v_lengthOfService := sqlserver_utilities.datediff('MONTH', v_empStartDate, v_effectiveDate) / 12.00;
       OPEN holDefCursor;
       FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
       WHILE ( sqlserver_utilities.fetch_status(holDefCursor%FOUND) = 0 )
       LOOP
          BEGIN
             IF v_selectedDateEffective < v_effectiveDate THEN
                v_entitlement := v_selectedAmount;
             END IF;
             -- Get the next value.
             FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
          END;
       END LOOP;
       CLOSE holDefCursor;
       -- Return the result of the function
       RETURN v_entitlement;
    END;Edited by: user4395499 on 27-Oct-2008 04:04
    Edited by: user4395499 on 27-Oct-2008 04:05
    Edited by: user4395499 on 27-Oct-2008 07:10

    Your code is extremely procedural - whilst you could ultimately get it to work like this, it is not the most efficient way of doing it.
    You should think about reducing your code to one sql statement if at all possible - this reduces the amount of context switching that needs to take place (eg. Going from PL/SQL to SQL back to PL/SQL to SQL, etc) and is usually much easier to maintain and test. You could do this by joining the various tables together, (and you might want to think about using nvl() to combine the two queries on the PERSON table!).
    Also, you've labelled your parameters "v_" and your variables "v_" ... common convention uses "p_" for parameters, to allow for easy distinction between parameters passed in and variables declared during the course of the procedure/function.
    As to the char() defined column - is there any chance that you could change that? As you've found out, chars are usually not a good datatype to use! Storing numbers in a char/varchar2 column is a no-no too, as you then run the risk of having invalid numbers stored in the column.

  • How to get iTunes 10 back on Mac OS 10.8.x?

    Hello,
    When I upgraded my system, MacOS overwrote my iTunes with 11.04 which for me is a big step back in ease of use.
    Is there anywhere an option to download an older iTunes (10.x) somewhere and overwrite this nasty new one under 10.8.4?
    Any help would be welcome.

    Thanks for your response.
    I know how to get it to act and look like the previous itunes - at least as much as possible.
    However:
    - The search now comes up with this pop-up menu which gets in my way. I would like to turn it off completely.
    When you have a large datase, the fastest way is to type into the search a name followed by other criteria such as album name year or genre. Anything else involves extra clicking and scrolling.
    - The album cover cannot be seen in the lower left corner. I don't want it floating in a separate window, and even floating, it only comes up when the piece is playing. Sometimes I just want to verify a name or something on the cover image and for that reason I just want to click a song name once without starting it.

  • Text in column 2 starts under the lowest line of column 1?

    Hello,
    i posted this question also in the Dutch forum, but there are not so many viewers in there, and now i found this forum.
    I have a problem with Dreamweaver CS4 (i am still very new with DW, but manage to create something)
    I am working with CS4 and have created a page.
    this page contains 5 regions:
    4 on top of each other, of which the 3rd contains 2 colums.
    I have uploaded this page and on my pc (IE7) it looks good, the text in the right column appears at the start of this region, at the same hight as the start of the buttons in the left column.
    [img]http://img8.imageshack.us/img8/2412/42056350.jpg[/img]
    If i view this page on the laptop (IE6), than there is a difference. The text in the right column starts at the bottom of the lowest button in the left column.
    [img]http://img8.imageshack.us/img8/5560/laptopq.jpg[/img]
    Does anybody know why or how to prevent this?
    I hope you can help. (i will give it a try in changing some settings, but i don't really know what to look for), so thanks in advance!
    Fred & Suze

    DWFAQ.info wrote:
    Won't this put rightcol under leftcol on the left side?
    I think it's the IE 3px text jog bug or the IE float bug.
    Ditch the marquee tag it's non-standard HTML markup.
    It is deprecated by the W3C and not advised by them for use in any HTML documents for a reason.
    I think your marquee is rendering as one line of text and is giving you a 3px jog.
    Yes it most likely is the 3px jog.
    My advice is if youre designing a 'static' site (as this is) it is best to use floats instead of margins to position containers.
    Floating the left and right column will work just fine and provide a more stable contruction.
    To test if it is the 3px jog take 3px away from the width of the right column.
    If you dont want to float google '3px jog' for a solution, there are several.

Maybe you are looking for

  • ITunes won't let me move files to new hard drive

    Hey, all...I'm having a really major problem with my computer. I'm trying to move my iTunes library to a new hard drive. Currently, it's in a 1-terabyte Western Digital USB drive powered through the USB, and I'm trying to move it to a Seagate 1-terab

  • Gap between two characters in SAP Script Address EndAddress.

    Hi Abapers, I have one query regarding Address - EndAddress in SAPScript. I am putting the code : /: ADDRESS TYPE '1' PARAGRAPH ZI PRIORITY 'APL43' LINES 6 /:ADDRESSNUMBER &ZPOLGORT-ADRNR& /:ENDADDRESS and  I am getting the output in this form <b><i>

  • What setting for ipad2 full screen.

    I am creating an animation in blender for use on the ipad. The full retina resolution is too big to create an animation in a reasonable amount of time so ipad2 resolution will be fine. What setting should I use for creating a movie for use on the iPa

  • Converter doesn't work

    My converter (calculator) doesn't work now. It worked always since a year before.  At the moment it's possible only to use the calculator for mathematical operations and not to convert currency, lenght, weight and so on. Thank you in advance for pati

  • What's about the suddenly extremely long right mouse-click menu?

    Suddenly, since the latest update (20.0.1) my right-click menu is terribly LONG. It's filled with things that seem useful, but are not to be and are not necessary at all. E.g. it contains video-control options, like mute and play, go full screen. Mor


HashFlare