Carousel in a state

Hello,
I tried to put a carousel in a state but it doesn't work. Does anyone know why ?
<mx:State name="MetzPromo">
     <mx:RemoveChild target="{image1}"/>
     <mx:RemoveChild target="{button1}"/>
     <mx:RemoveChild target="{button2}"/>
     <mx:RemoveChild target="{image2}"/>
     <mx:RemoveChild target="{button3}"/>
     <mx:RemoveChild target="{button4}"/>
     <mx:AddChild position="lastChild">
          <mx:Canvas width="842" height="435" x="153" y="392">
               <mx:Button x="804" y="232" label="right" id="right" click="moveRight(),goBack()"/>
               <mx:Button x="582" y="232" label="left"  id="left"  click="moveLeft(),goBack()" />
          </mx:Canvas>
     </mx:AddChild>
     <mx:AddChild position="lastChild">
          <mx:Canvas id="pv3dCanvas" y="262" width="630" height="303" borderColor="#110101" backgroundColor="#841414" alpha="1.0" backgroundAlpha="0.57" horizontalCenter="0"> 
          </mx:Canvas>
     </mx:AddChild>
</mx:State>
Well , I have that screen :
And when i put the carousel in my main state ( '' ) it works properly :
And I wonder why ... The code is the same ....
Thank You !

2nd Up ....

Similar Messages

  • How can I determine which image was clicked in 3D carousel?

    I have been modifying some 3D carousel code that I found in hopes that I can get it such that when image "resolv2.jpg" (or any of my other images) is clicked on at the front of my carousel, it goes to a specific webpage. By just replacing "moveBack(event.target) from the toggler section of the code with "navigateToURL:(newURLRequest('http://google.com'), the target DOES sucessfully go to google when clicked on. However, I want to modify this code by altering the else statement to say something to the effect of "else if event.target (clicked on object) is 'resolv2.jpg' THEN go to google". So essentially, my question is how can I determine which image was clicked? Here is the entire code with the area I was altering bolded:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init();" backgroundGradientColors="[#000033, #000033]" backgroundGradientAlphas="[1.0, 1.0]">
    <mx:Script>
              <![CDATA[
    //Import Papervision Classes
                   import org.papervision3d.scenes.*;
                   import org.papervision3d.cameras.*; 
                   import org.papervision3d.objects.*;
                   import org.papervision3d.objects.primitives.*;
                   import org.papervision3d.materials.*;
                   import org.papervision3d.materials.shadematerials.*;
                   import org.papervision3d.materials.utils.MaterialsList;
                   import org.papervision3d.lights.*;
                   import org.papervision3d.render.*;
                   import org.papervision3d.view.*;
                   import org.papervision3d.events.*;
                   import org.papervision3d.core.*;
                   import org.papervision3d.lights.PointLight3D;
                   import flash.filters.DropShadowFilter;
                         import caurina.transitions.*;
                         private var numOfItems:int = 5;
                         private var radius:Number = 600;
                         private var anglePer:Number = (Math.PI*2) / numOfItems;
                         //private var dsf:DropShadowFilter = new DropShadowFilter(10, 45, 0x000000, 0.3, 6, 6, 1, 3);
                   public var angleX:Number = anglePer;
             public var dest:Number = 1;
                   private var theLight:PointLight3D;
            //Papervision Engine
                   private var viewport:Viewport3D; 
                   private var scene:Scene3D; 
                   private var camera:Camera3D;
                   private var renderer:BasicRenderEngine;
             private var planeArray:Array = new Array();
             [Bindable]
             public var object:Object;
             private var arrayPlane:Object;
             private var p:Plane;
             //Initiation function           
             private function init():void 
             viewport = new Viewport3D(pv3dCanvas.width, pv3dCanvas.height, false, true); 
             pv3dCanvas.rawChildren.addChild(viewport); 
             viewport.buttonMode=true;
             renderer = new BasicRenderEngine();
             scene = new Scene3D(); 
             camera = new Camera3D();
             camera.zoom = 2; 
             createObjects(); 
             addEventListeners();
    //Create Objects function          
              private function createObjects():void{
              for(var i:uint=1; i<=numOfItems; i++)
                        /* var shadow:DropShadowFilter = new DropShadowFilter();
                        shadow.distance = 10;
            shadow.angle = 25; */
                        var bam:BitmapFileMaterial = new BitmapFileMaterial("images/resolv"+i+".jpg");
                        bam.oneSide = false;
                        bam.smooth = true;
            bam.interactive = true;
                        p = new Plane(bam, 220, 200, 2, 2);
                        p.x = Math.cos(i*anglePer) * radius;
                        p.z = Math.sin(i*anglePer) * radius;
                        p.rotationY = (-i*anglePer) * (180/Math.PI) + 270;
                        scene.addChild(p);
                        //p.filters=[shadow];
                        p.extra={pIdent:"in"};
                        p.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
            planeArray[i] = p;
              // create lighting
            theLight = new PointLight3D();
            scene.addChild(theLight);
            theLight.y = pv3dCanvas.height;
              private function toggler(event:InteractiveScene3DEvent):void
                            // if the cube's position is "in", move it out else move it back
                            if (event.target.extra.pIdent == "in")
                                    moveOut(event.target);
                            else
                                   moveBack(event.target);
                    private function moveOut(object:Object):void
                              trace(object +" my object");
                            // for each cube that was not selected, remove the click event listener
                            for each (var arrayPlane:Object in planeArray)
                                    if (arrayPlane != object)
                                            arrayPlane.removeEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                            //right.enabled=false;
                            //left.enabled=false;
                            // move the selected cube out 1000 and rotate 90 degrees once it has finished moving out
                            Tweener.addTween(object, {scaleX:1.2, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            Tweener.addTween(object, {scaleY:1.2, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            // set the cube's position to "out"
                            object.extra = {pIdent:"out"};
                            // move the camera out 1000 and move it the to same y coordinate as the selected cube
                            //Tweener.addTween(camera, {x:1000, y:object.y, rotationX:0, time:0.5, transition:"easeInOutSine"});
                    private function moveBack(object:Object):void
                            // for each cube that was not selected, add the click event listener back
                            for each (var arrayPlane:Object in planeArray)
                                    if (arrayPlane != object)
                                            arrayPlane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                            // move the selected cube back to 0 and rotate 90 degrees once it has finished moving back
                            Tweener.addTween(object, {scaleX:1, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            Tweener.addTween(object, {scaleY:1, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            // set the cube's position to "in"
                            object.extra = {pIdent:"in"};
                            // move the camera back to its original position
                            //Tweener.addTween(camera, {x:0, y:1000, rotationX:-30, time:0.5, transition:"easeInOutSine"});
                            //right.enabled=true;
                            //left.enabled=true;
                    private function goBack():void
                            // for each cube that was not selected, add the click event listener back
                            for each (var arrayPlane:Object in planeArray)
                                    if (arrayPlane != object)
                                            arrayPlane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                    private function rotateCube(object:Object):void
                            //object.rotationX = 0;
                            //Tweener.addTween(object, {rotationZ:0, time:0.5, transition:"easeOutSine"});
              private function addEventListeners():void{
        this.addEventListener(Event.ENTER_FRAME, render);
    //Enter Frame Listener function             
    private function render(e:Event):void{ 
                     renderer.renderScene(scene, camera, viewport);
                     camera.x = Math.cos(angleX) * 800;                                                  
                     camera.z = Math.sin(angleX) * 800;
    private function moveRight():void
              dest++;
              Tweener.addTween(this, {angleX:dest*anglePer, time:0.5});
              //goBack();
    private function moveLeft():void
              dest--;
              Tweener.addTween(this, {angleX:dest*anglePer, time:0.5});
              //goBack();
              ]]>
    </mx:Script>
              <mx:Canvas width="1014" height="661">
              <mx:Canvas id="pv3dCanvas" x="503" y="20" width="400" height="204" borderColor="#110101" backgroundColor="#841414" alpha="1.0" backgroundAlpha="0.57"> 
              </mx:Canvas>
              <mx:Button x="804" y="232" label="right" id="right" click="moveRight(),goBack()"/>
              <mx:Button x="582" y="232" label="left"  id="left"  click="moveLeft(),goBack()" />
              </mx:Canvas>
    </mx:Application>

    Your answer may be correct, but I am very much a beginner to actionscript, and I was wondering moreso if it is possible to determine the root/url (i.e. images/resolv2.jpg)? Or even if InteractiveScene3DEvent calls a variable that holds this url? However, specifically, I'm just wondering if the actionscript itself could determine the url in a line of code such as "if object == BitmapFileMaterial("/images/resolv2.jpg"); "? Also, here's a copy of InteractiveScene3DEvent in more detail if you think that will help:
    public class InteractiveScene3DEvent extends Event
                         * Dispatched when a container in the ISM recieves a MouseEvent.CLICK event
                        * @eventType mouseClick
                        public static const OBJECT_CLICK:String = "mouseClick";
                         * Dispatched when a container in the ISM receives an MouseEvent.MOUSE_OVER event
                        * @eventType mouseOver
                        public static const OBJECT_OVER:String = "mouseOver";
                         * Dispatched when a container in the ISM receives an MouseEvent.MOUSE_OUT event
                        * @eventType mouseOut
                        public static const OBJECT_OUT:String = "mouseOut";
                         * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_MOVE event
                        * @eventType mouseMove
                        public static const OBJECT_MOVE:String = "mouseMove";
                         * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_PRESS event
                        * @eventType mousePress
                        public static const OBJECT_PRESS:String = "mousePress";
                         * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_RELEASE event
                        * @eventType mouseRelease
                        public static const OBJECT_RELEASE:String = "mouseRelease";
                         * Dispatched when the main container of the ISM is clicked
                        * @eventType mouseReleaseOutside
                        public static const OBJECT_RELEASE_OUTSIDE:String = "mouseReleaseOutside";
                         * Dispatched when a container is created in the ISM for drawing and mouse interaction purposes
                        * @eventType objectAdded
                        public static const OBJECT_ADDED:String = "objectAdded";
                        public var displayObject3D                                        :DisplayObject3D = null;
                        public var sprite                                                            :Sprite = null;
                        public var face3d                                                            :Triangle3D = null;
                        public var x                                                                      :Number = 0;
                        public var y                                                                      :Number = 0;
                        public var renderHitData:RenderHitData;
                        public function InteractiveScene3DEvent(type:String, container3d:DisplayObject3D=null, sprite:Sprite=null, face3d:Triangle3D=null,x:Number=0, y:Number=0, renderhitData:RenderHitData = null, bubbles:Boolean=false, cancelable:Boolean=false)
                                  super(type, bubbles, cancelable);
                                  this.displayObject3D = container3d;
                                  this.sprite = sprite;
                                  this.face3d = face3d;
                                  this.x = x;
                                  this.y = y;
                                  this.renderHitData = renderhitData;
    Thank you so much!

  • Cadac Template - Carousel Advice Required

    Hey guys the design firm I work for are pretty new to building websites and Business Catalyst has been a really great resource for us as they are easy to use and the templates look great!
    We are graphic designers and know very little programming. I am developing the Cadac Template for one of our clients and I don't know how to edit the slider.
    Does anyone know what I need to do in the code to make the slider show only 4 images with no text or sidebar?
    Here's a link to the site so far http://nightingalesgoldencare.businesscatalyst.com/

    Thanks Justin,
    With your input and a fresh pair of eyes it's fixed - I think.
    It would seem the template designer has chosen to include some of the <div class="???"> statements within the html of each "Page" rather than the "Page Template". Something I consider dangerous when the end users of the CMS may not be web savvy. As had happened in this case those  users can delete those <div> statements if they choose to edit the "Pages" using the back end... the very same <div> statements that are responsible for giving the page its structure.
    Add that to my earlier rant about this template's unsuitability for a CMS system in its current incarnation
    So... In this case... the Slide/Carousel "Description" was entered into the "Description" box from scratch - hence it contained none of the required <div> statements to enclosed it correctly.
    We've shifted those essential  <div> statements from to the"Pages" to the "Page Templates" where they are less likely to be accidentally removed.
    It also didn't help that the Carousel "Detail Layout" already had extra table regions that we didn't need.

  • Load content in another viewing space... Button..Viewer..Video..Panorama.. Carousel..Dreamw..Flash..

    Dear Reader,
    I made a site with a custom player to show video. I made my own buttons in Flash. On type showed while hovering over the played video and are used for controlling play/pause - button for homepage and two buttons for the next or previous gallery. The other type are underneath the playing video and let you pick thumbnails whose links were shown in the player window.
    First I wanted to use a carousel (Lee Brimelow) for the second type of buttons, but I couldn't integrate these with the rest of the player code (my flash-code knowledge is rather limited).
    Later on I wanted to show a panorama wich I only got to work with the Away3D-method. In this case I couldn't integrate it with any other code, so I used Dreamweaver to let a viewer choose thumbnails. One can navigate in the viewer window by dragging in the window, so I left out the other navigation buttons within the player window, mentionned earlier.
    Now I am thinking of this concept:
    - Button(s) for Homepage and (Next/Previous) gallery;
    - Viewer window, with
              - timeslider and Play/Pause button integrated in case of a video or slideshow;
              - dragging in case of a Panoramic view;
    - Carousel for picking a subject that will be shown in the Viewer window.
    Question:
    - Can I combine these 3 types of the concept as Flash-movies and buttons/carousel in Dreamweaver and still have the carousel control the viewer window?
    or:
    - Should I do all in Flash and make a personal Flashplayer (like I did before) and study more Flash?
    What tutorials could I take a look at? (For instance I found a lot of sites about how to make a carousel. I don't know how to make it control a viewer window (to make it load content in another window or space.)
    Greatings,
    Richafrost.

    Hi,
    Just wanted to clarify a few things to try and eliminate what could be causing the problem.
    1. You are using rtmps protocol. Do you have SSL certificate configured and port 443 enabled?
    2. When you tried playback via the hosted OSMF player was it via rtmps?
    3. The standard way the request url is protocol://server-domain-or-IP/fms-app-name/[fms-app-instance-name/][codec-prefix:]file-pa th[filename-extension]. Could you try with that?
    I tried to reproduce your issue with simple rtmp prtocol and here are my observations/suggestions :
    1.When I first entered the source url I got the error you mentioned : "The video player is in the connection error state." However, when I publish the same .fla again it works fine.
    2. When you are placing the on a computer on the same network and running the html in the browser, it might not have permission to access the network. You will generally get a pop-up saying "Flash Player has stopped a potentially unsafe option". In any case, in your Flash player settings manager you can go to the Advanced tab and add the location of the folder containing the swf as a Trusted location and then try to reload the page again. I get the "status bar spin" when the folder did not have permissions.
    3. Also, when you try playback via Share Point can you go back to FMS and check if a connection request has actually come to the server. You can check under the access logs in root_install/logs or the application logs under root_install/logs/_defaultVHost_/vod/
    Please let me know if this helps.
    Thanks,
    Apurva

  • Video section in carousel menu after hard reset...

    Hi, I've a problem with my N85. After the upgrade to firmware 20.175 I've reset with Hard Reset the phone and after this the Video section in the Carousel menu are  empty even if i have a lot of videos in my microsd. Last seen is empty, my videos is empty, feed videos is empty but i have a lot of videos an feeds. This is a bug or a problem in my phone? An help is very appreciated.

     Hi useless701,
    Thanks for posting and welcome to the forum.
    Use the reset methods available to you and not the ones which are reserved for use by a Nokia Care Point if they need to force reset a device which is no longer responsive before rewriting the system firmware.
    The two user applicable reset options are;
    Dial *#7780# followed by the security code when asked (default is 12345)
    This will reset device settings to defaults. It will not change or remove any user data or files.
    Dial *#7370# followed by the security code when asked (default is 12345)
    This will perform the same actions but also return the device to it's factory state removing all user data and files.
    Any other codes or keycombinations are _not_ supposed to be used by the device user and should in general be followed by a full flash of the device by a Nokia Care Point.
    Kosh
    Press the 'Accept As Solution' icon if I have solved your problem, click on the Star Icon below if my advice has helped you!

  • Loading html content from different data carousels

    In the ServiceDomain class the method
    public void attach(Locator l)
    throws DSMCCException,
    java.io.InterruptedIOException,
    MPEGDeliveryException
    states that the locator must either reference a service with only one object carousel or reference an elementary stream carrying the DSI of the object carousel
    How do I create a locator that reference an elementary stream? Doesn't seem to be any constructors for that in the org.davic.net.dvb.DvbLocator...
    Regards Thorbj�rn

    In the ServiceDomain class the method
    public void attach(Locator l)
    throws DSMCCException,
    java.io.InterruptedIOException,
    MPEGDeliveryException
    states that the locator must either reference a service with only one object carousel or reference an elementary stream carrying the DSI of the object carousel
    How do I create a locator that reference an elementary stream? Doesn't seem to be any constructors for that in the org.davic.net.dvb.DvbLocator...
    Regards Thorbj�rn

  • And/or if statement in rtf templates.

    Hi all,
    I'm using XML Publisher 4.5.
    I have created a word template file (rtf) for my reports. I need to be able to show some content in the template file by using and and/or if statement.
    fx. <?if:doc_type='STANDARD'?> OR <?if:doc_type='DEFAULT'?>
    How can I do this?
    In advance thank you.
    Best regards
    Kenneth

    Hi D,
    Thank you for your answer.
    I have seriously thought about that solution; but I don't think it's a smart way to do it.
    If i do it like that, i need to copy the whole table and paste it inside the if statements.
    I have two xml elements that I need to make the decisions on. POH_PO_TYPE & CP_RELEASE_NUM.
    POH_PO_TYPE can be: STANDARD, RELEASE or BLANKET.
    CP_RELEASE_NUM can be: '' or N
    If POH_PO_TYPE is RELEASE AND CP_RELEASE_NUM is not ''
    OR POH_PO_TYPE is STANDARD
    OR POH_PO_TYPE is BLANKET AND CP_RELEASE_NUM is ''
    THEN show table (which contains the whole PO).
    It shall show the content of the PO in any of these cases.
    BR Kenneth

  • Filename in import statement

    Hi srinivas bobbala,
    Thank you for your response.But I think my quesition was not clear.My ques... is for suppose there is one datafile for importing like.. "datafile_21" Here my intention is it takes file from datafile_21 only but it appears in import statement like datafile_21<<curmon>>.
    import database sample.sample data from data_file "c:\\ABC\datafile_21_AUG.txt" using server rules_file datafile on error abort;
    In this it takes datafile from datafile_21.But it appears like datafile_21_AUG in import statement.This AUG coming from batch file.
    Essmsh c:\\ABC\loadmxl.mxl %curmon%

    No it is not possible.
    I assume the data file "datafile_21" is first renamed to datafile_21_${CurrMth} in the batchscript.
    After that this data file *datafile_21_${CurrMth}* is pointed in the import statement.
    In the logs you will see this file as datafile_21_Aug.

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • When would I use an if, for or while statement in Small Basic and what is the difference between the three?

    I have a Y9 Computer Science Exam next week and I know that this will probably be one of the questions on it so I need to know the answer. What is the difference?

    An If statement executes once IF the statement is true:
    If 1 = 2/2 Then
    Textwindow.writeline("True")
    EndIf
    A While statement executes WHILE the statement is true:
    While 4 = 2+2
    'Will keep looping while it is true
    EndWhile
    A For statement loops a number in increment:
    For i = 1 to 10
    'Every time through, i gets bigger by one until it equals 10
    EndFor
    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

  • If statement in sql

    regarding the following sql:
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id(+)
    AND c.statetypeid = d.statetypeid(+)
    AND c.addresstypeid in (1,2,3,4)
    I have a database of users and addresses. Each user can
    have multiple addresses and the addresses are
    designated by addresstypeid. In plain english, what I want
    to pull is "If they have an addresstypeid of 1, pull that one
    only, if not, check if they have a 2 and use that, if not, check
    for a 3, etc..".
    Any help with this?

    What you want, then, is to pull the address with the minimum addresstypeid ..
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id(+)
    AND c.statetypeid = d.statetypeid(+)
    AND c.addresstypeid =
    (select min(c2.addresstypeid)
    from address c2
    where c2.userid=a.userid
    I'm not sure what this will do to your outerjoin, though. You might have to get funky with a union ...
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id
    AND c.statetypeid = d.statetypeid
    AND c.addresstypeid =
    (select min(c2.addresstypeid)
    from address c2
    where c2.userid=a.userid
    Union all
    SELECT a.lname, a.fname, a.user_id, to_char(null), to_char(null),
    to_char(null), to_char(null), to_char(null)
    FROM users a
    WHERE not exists
    (select 1
    from address c
    where c.userid=a.userid
    )

  • 'IF' statement in a select statment?

    I have the following cursor in a package specification;
    cursor c_sales_code is
    select sales_condition||' MC '||sales_option
    from sales;This will return something like: 'T300 MC 9'
    MC means 'multiple choice' for when there are multiple options. Although, sales_option is sometimes null and in this case I just want 'T300' to be returned, not 'T300 MC'.
    How would I go about doing this?
    Thanks,
    fakelvis

    Use
    CASE and DECODE
    to add the functoinality of Conditional Statements in Your SQL Statements..
    These two CASE / DECODE will help you to get your desired output

  • IF Statement in Select

    I need to choose between value1 and value2 within a select statement.
    TableA
    Flag (char)
    Value1
    Value2
    ItemDesc
    pseudo code
    select ItemDesc, (if Flag = 'y' then Value1 else Value2) as Price from TableA;
    How can this be done?

    select   itemdesc,
             sum (case
                     when flag = 'y'
                        then (case
                                 when value1 < 10
                                    then value1 * 1.2
                                 else value1
                              end)
                     else value2
                  end
                 ) as price
        from tablea
    group by itemdesc;

  • If statement in select statement alias

    I have the following select statement. It has the alias Survivors, Deaths and "All Cases". Is it posible to use :P_LANGUAGE variable to say that -- IF :P_LANGUAGE = FRENCH THEN alias are Survivants for survivors, Décès for Deaths, Tous_les_cas for All Cases. Please advise
    SELECT ALL T_NTR_MULTIBAR.CAT, T_NTR_MULTIBAR.NUM_CASES_LEFTBAR AS Survivors,
    T_NTR_MULTIBAR.NUM_CASES_MIDDLEBAR AS Deaths, T_NTR_MULTIBAR.NUM_CASES_RIGHTBAR AS "All Cases"
    FROM T_NTR_MULTIBAR
    WHERE INSTANCE_NUM = :P_INSTANCENUM
    order by ORDERS

    You may not be able to add this condition inside the SQL Statement. But you can add this condition outside the statement, if you're using PL/SQL...
    IF :p_language = french THEN
    SELECT ALL t_ntr_multibar.cat,
      t_ntr_multibar.num_cases_leftbar AS survivors,
      t_ntr_multibar.num_cases_middlebar AS deaths,
      t_ntr_multibar.num_cases_rightbar AS "All Cases"
    ELSE
    END IF;

  • If Statement in PLD

    I'm trying to set up a formula similiar to an If then statement with the PLD, and not having any luck.   I need to create a formula on a sales order that says if  there is no frieght on the order display "0.00". 
    Thanks.
    Eric

    Hi,
    Create a field with empty value (Say field ID is 100).
    Create a formula field which equals fields 100 and 186 (Say field ID is 101).
    Create a formula field which has "not equals" as relation, within fields 100 and 186 (Say field ID is 102).
    Create a field with the text 0. Link it with the field 101. Put it in the same place as the 186.
    Link the 186 field with the 102.
    Result: 0 will be shown when 186 is empty, value of 186 when is not empty.
    Hope is clear,
    Ibai Peñ

Maybe you are looking for

  • How to change the default browser for "Search in Google" pop-up menu?

    This issue has come up for the last three OS X releases, at least, and it's still here for Lion. I'm in Apple Mail and select some text. I want to search on the term using Google. Right-click brings up the context menu with "Search in Google." This i

  • Adobe Reader X End User License Error

    Operating System: Windows 7 Professional x32 Product: Adobe Reader X In reading through other forums it seems that this is a common bug with Adobe Reader X. We are a medical company and have a lot of CCR and CR's that are in PDF form. Seems that when

  • Exporting video made in FCE to WMV?

    Hello, After making a video in FCE, how do I export it to WMV? Do I need some other software rather than IDVD? Thank you. Ed

  • Authoring a DVD in DVD SP

    Hello, I am creating a DVD of a 30 minute DV program. I export the timeline from FCP as uncompressed QuickTime then import it into DVD SP. When I build & burn the DVD, the whole thing comes out to be around 1.5 GBs. Since I have approximately 3 more

  • Boris 3D Titler Went Walkies?

    My Boris 3D titler (the one you get standard from the bottom right hand pull-down in the video viewer) is missing! Anyone know how to get it back? Ive havent done any reinstall or anything like that! thanks in advance..