Help with packages and functions that it

Hello, I need help with the package.
I have two tables of the employee base (id, firstname, lastname, etc..) T1 and T2.
What I need, it's a package and two features inside. First function reads the data from T1 and passes to the second function, where second function reads data from T2 and concatenates the data just read with data from function1 and data T1 + T2 function2 goes on the main program that displays this data.

So far, I have:
create or replace type emp_type as object
(id number,
firstname varchar(20),
lastname varchar(20),
salary number(9,2));

create or replace type emp_type_table as table of emp_type;

create or replace package my_package
is emp_table emp_type_table:= emp_type_table();      -- *not sure if this line is correct*
function get_T1_emp return emp_type_table;
function get_T2_emp (T1_emp in emp_type_table) return emp_type_table;
end my_package;

-- *confusion begins*

create or replace package body my_package as 
function get_T1_emp
return  emp_type_table as 
  emp_table emp_type_table:= emp_type_table();
begin
     for i in (select * from T1) loop
         emp_table.extend;
         emp_table(emp_table.count):= (emp_type(i.id, i.firstname, i.lastname, i.salary));
      end loop;
    return emp_table; 
end get_T1_emp; 
- get_T1_emp function seems to be quite beautiful. At least it works separately
function get_T2_emp (T1_emp in emp_type_table)
return  emp_type_table  
  emp_table emp_type_table:= emp_type_table();
begin
     for i in (select * from T2) loop
         T1_emp.extend;
         T1_emp(T1_emp.count):= (emp_type(i.id, i.firstname, i.lastname, i.salary));
      end loop;
    return T1_emp; 
end get_T2_emp;
end my_package;


DECLARE
  v_Return emp_type_table;
  v_Return2 emp_type_table;
BEGIN
  v_Return := get_T1_emp;
  v_Return2 := get_T2_emp(v_Return);
  for i in 1..2 loop
    DBMS_OUTPUT.PUT_LINE(v_Return2(i).id || ', ' || v_Return2(i).firstname || ', ' || v_Return2(i).lastname 
    || ', ' || v_Return2(i).salary || 'EUR');
  end loop;
END;
So basically I don't know about my tax package.
Most important, I don't know how to write the get_T2_emp function. And also not very sure of my main function. Please can someone help my with my problem

Published by: dber November 6, 2011 21:22

Published by: dber November 6, 2011 23:38 added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

Hello

Here you go

SQL> DROP TABLE t1;

Table dropped.

SQL> DROP TABLE t2;

Table dropped.

SQL> CREATE TABLE t1 (id NUMBER,
  2                   firstname VARCHAR2(100),
  3                   lastname VARCHAR2(100) );

Table created.

SQL> CREATE TABLE t2 (id NUMBER,
  2                   firstname VARCHAR2(100),
  3                   lastname VARCHAR2(100) );

Table created.

SQL> INSERT INTO t1  (SELECT 1,'SURI','DAMA' FROM dual
  2                     UNION ALL
  3                     SELECT 2,'SRINU','DAMA' FROM dual);

2 rows created.

SQL> INSERT INTO t2  (SELECT 3,'ABC','XYZ' FROM dual
  2                     UNION ALL
  3                     SELECT 4,'DEF','PQR' FROM dual);

2 rows created.

Package code


SQL> CREATE OR REPLACE PACKAGE test_array_pkg
  2  AS
  3    TYPE test_array1 IS TABLE OF t1%rowtype  INDEX BY PLS_INTEGER;
  4    TYPE test_array2 IS TABLE OF t2%rowtype  INDEX BY PLS_INTEGER;
  5
  6    FUNCTION get_t1 RETURN test_array1;
  7    FUNCTION get_t2(p_t1 IN test_array1)
  8    RETURN test_array2;
  9
 10  END test_array_pkg;
 11  /

Package created.

Package body

 SQL> CREATE OR REPLACE PACKAGE BODY test_array_pkg
  2  AS
  3    t1_array1 test_array1;
  4    t2_array2 test_array2;
  5
  6    FUNCTION get_t1
  7    RETURN test_array1
  8    IS
  9
 10      n NUMBER :=0;
 11
 12    BEGIN
 13
 14     FOR i IN (SELECT * FROM t1)
 15     LOOP
 16
 17       t1_array1(n).id:= i.id;
 18       t1_array1(n).firstname := i.firstname;
 19       t1_array1(n).lastname := i.lastname;
 20
 21       n:=n+1;
 22
 23     END LOOP;
 24
 25     RETURN t1_array1;
 26
 27    END get_t1;
 28
 29    FUNCTION get_t2(p_t1 IN test_array1)
 30    RETURN test_array2
 31    IS
 32
 33      n NUMBER:=0;
 34
 35    BEGIN
 36
 37     FOR i IN p_t1.FIRST..p_t1.LAST
 38     LOOP
 39
 40       t2_array2(n).id:=p_t1(i).id;
 41       t2_array2(n).firstname:= p_t1(i).firstname;
 42       t2_array2(n).lastname := p_t1(i).lastname;
 43
 44       n:=n+1;
 45
 46     END LOOP;
 47
 48     FOR i IN (SELECT * FROM t2)
 49     LOOP
 50
 51       t2_array2(n).id:=i.id;
 52       t2_array2(n).firstname:= i.firstname;
 53       t2_array2(n).lastname := i.lastname;
 54
 55       n:=n+1;
 56
 57     END LOOP;
 58
 59     RETURN t2_array2;
 60
 61    END get_t2;
 62
 63
 64  END test_array_pkg;
 65  /

Package body created.

Main script

 SQL> declare
  2
  3     t1_result test_array_pkg.test_array1;
  4     t2_result test_array_pkg.test_array2;
  5
  6  begin
  7
  8    t1_result:= test_array_pkg.get_t1;
  9    t2_result:= test_array_pkg.get_t2(t1_result);
 10
 11    FOR i IN t2_result.first..t2_result.last
 12    LOOP
 13
 14      dbms_output.put_line(t2_result(i).id||' '||t2_result(i).firstname||' '||t2_result(i).lastname);
 15
 16    END LOOP;
 17
 18  end;
 19  /
1 SURI DAMA
2 SRINU DAMA
3 ABC XYZ
4 DEF PQR

PL/SQL procedure successfully completed.

Tags: Database

Similar Questions

  • A program of Photoshop for beginners help with things and advertising brochures

    What would be a good program of Photoshop for beginners help with things and advertising brochures

    ' Advertising brochures and things ' seems to imply elements that will be printed on both sides of a piece of paper or make multipage documents.

    Photoshop is an image editor and can have only 1 page per document.

    In short, Photoshop is the application bad for something more than a single item from the front.

    Adobe InDesign is a page layout program that is specifically designed to create multipage documents.

    You can type or place text, photos of the place and the other images and have better control over the placement and arrangement of the elements on the page.

    InDesign, like Photoshop, Illustrator has a steep learning curve.

    You can download Adobe trial versions (these will only work for 30 days) and raise you some books or sign for video lessons on Lynda.com

  • I recently had to have my rebuilt computer caused by a virus. Now I have Mozilla Firefox with ABP and noticed that Mozilla has a built-in phishing and virus program. Do I need another antivirus program and if so, the one that works best with Firefox?

    I recently had to have my rebuilt computer caused by a virus. Now I have Mozilla Firefox with ABP and see that Firefox has a program's built-in phishing and viruses. Do I need a program additional anti-malware? If so, the one that works best with Firefox? Seems put more you on these things the you have more trouble.

    The anti-phishing protection and malware that Firefox uses checks against a list of websites that have been reported to contain a form of malware and then alerts you. Firefox itself does not scan files to see if they contain viruses/malware. You still need a form any anti-virus and anti-malware protection. You must also use a firewall.

    As for which is better, you are likely to get many different answers, it's a topic that generates a lot of discussion. A product one person loves will be hated by someone else. I use Microsoft Security Essentials as well as Windows Firewall.

  • Need help with packaging CS4; activation of 10.10 and 10.11 customers

    We have a package made by activating the former employee worked in 10.9 OSX clients. Now, we need to rebuild and get the activation job. Our license is provided.

    Is likely not to be able to do this because of the 'special' required to install OLD programs on the NEW Mac (see below)

    But to help you, you need these 2 links... Packer links https://forums.adobe.com/thread/1586021

    http://forums.Adobe.com/community/download_install_setup/creative_suite_enterprise_deploym ent

    CS6 and previous programs have not been tested and will not be updated to run on Mac El Capitan

    -which means you are trying to use CS6 and earlier at YOUR risk of having problems

    -You can get CS6 and previous programs to install and run, or you can not (some do, some don't)

    -IF not, Details of the message from the error messages and a person may be able to help (just not Adobe)

    Maybe it's a fake because of Mac El Capitan and OLD programs error

    This information is a MUST to install old programs on Mac El Capitan

    -You can't get the same error message, but here are some links that CAN help with old programs

    -Java https://helpx.adobe.com/dreamweaver/kb/dreamweaver-java-se-6-runtime.html can help

    Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)

    -also a TEMPORARY security change https://forums.adobe.com/thread/2039319

    -http://mac-how-to.wonderhowto.com/how-to/open-third-party-apps-from-unidentified-developer s-mac-os-x-0158095 /

    -the guardian https://support.apple.com/en-au/HT202491

  • Help with Facebook and media social widgets (was: how to fix the three probs that...)

    I have problems with the facebook or social networking widgets. I would like the link to send viewers to my facebook business page, but when a test it shows my pic and a 'switch' sign (see screenshot) and when I opened the site, the message is as another screenshot, great, but I don't know where to find what "asset" is the problem and why. Also why have child pages if the menu reflects that? I see that drop down menus are a problem, also with some other members of the forum.

    Screen Shot 2013-12-15 at 10.51.54 am.png

    Screen Shot 2013-12-15 at 11.00.16 am.png

    Thanks for any help offered!, I think I have solved the first problem now but still would appreciate any help with the other 2!

    For some reason any the facebook widget now load the right page and I give up on the drop down menu, I hope that this issue will be resolved in the next update of Muse?

    Hello

    For the issue of the "asset", try to locate assets in the active panel. It must have an icon like this: http://jingsite.businesscatalyst.com/jing/2013-12-16_0917.png

    For children in the edition of menu pages, go to menu options (by clicking on the small blue arrow in the upper right of the menu), and then change the type of menu to 'All the Pages' instead of 'high level Pages '.

    I hope this helps.

    See you soon

    Parikshit

  • Help with public static functions.

    Hey everyone, I worked on a problem for a while and have finally understood just wrong. Google is not helped me to find the right way, so I'm posting it here. I sort of understand what's wrong with my code, but I have no idea how to do right. I'm a total noob to AS3, this is my first project.

    I have a main FLA file called game.fla with nothing on the stage, starting with. The document class is Main.as (shown below). The main class is supposed to manage the switching between the preLoader, mainMenu and game itself. The preloader loads and the player must press play to go to the main menu. The main menu is controlled by MainMenu.as, which adds event listeners for buttons game, instructions and credits. At the present time, instructions and credits just draw responses. When you click on play, I want to remove the mainmenu (not a problem with parent.removeChild (this)); and add the game. This is my problem comes in. I can't say parent.addChild (game), because honestly, I don't know how (I need to set a variable in hand or MainMenu and must it be public, static, etc?). Simplicity seems to be a function called initializeGame() that I could simply call of mainMenu. Problem: I have to do a static function, which doesn't let me use addChild, removeChild or any other variable that I create. Could someone please explain how I could do this job (even if it means change my structure. "I would be happy to learn a better way to deal with this kind of thing). Also, on a side note: if I can't use the static function with add or remove a child, can I optimize the effect later? I want later in my game, that I would need to call functions between classes, on a button click, for example, that affect the scene (or objects in the scene). Can I do it another way? For example, by clicking on an icon of the video game card clip, I would map the movieclip to load. A function that could be described seems the best way to do it, but I'm sure he can otherwise. Thank you much in advance. My code is below.

    Main.As

    package
    {
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.MouseEvent;
    
        public class Main extends MovieClip
        {
            private var preLoader:PreLoader;
            private var mainMenu:MainMenu;
            private var game:Game;
            
            public function Main()
            {
                preLoader = new PreLoader;
                addChild(preLoader);
                preLoader.gotoAndStop(1);
                addEventListener(Event.ENTER_FRAME, barLoading);
            }
            private function barLoading(event:Event):void
            {
                var total:Number = stage.loaderInfo.bytesTotal;
                var loaded:Number = stage.loaderInfo.bytesLoaded;
                preLoader.loadingBar.scaleX = loaded/total;
                
                if (loaded==total)
                {
                    removeEventListener(Event.ENTER_FRAME, barLoading);
                    preLoader.gotoAndStop(2);
                    preLoader.doneLoading.addEventListener(MouseEvent.CLICK, doneLoading);
                    loaded = null;
                    total = null;
                }
            }
            private function doneLoading(event:MouseEvent):void
            {
                preLoader.doneLoading.removeEventListener(MouseEvent.CLICK, doneLoading);
                mainMenu = new MainMenu;
                addChild(mainMenu);
                removeChild(preLoader);
            }
            static public function initializeGame():void
            {
                game = new Game;
                removeChild(mainMenu);
                addChild(game);
            }
        }
    }
    

    MainMenu.as

    package
    {
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.MouseEvent;
    
        public class MainMenu extends MovieClip
        {
            
            public function MainMenu()
            {
                playGameButton.addEventListener(MouseEvent.CLICK, playGameButtonFunction);
                instructionsButton.addEventListener(MouseEvent.CLICK, instructionsButtonFunction);
                creditsButton.addEventListener(MouseEvent.CLICK, creditsButtonFunction);
            }
            private function playGameButtonFunction(event:MouseEvent):void
            {
                playGameButton.removeEventListener(MouseEvent.CLICK, playGameButtonFunction);
                instructionsButton.removeEventListener(MouseEvent.CLICK, instructionsButtonFunction);
                creditsButton.removeEventListener(MouseEvent.CLICK, creditsButtonFunction);
                            
            }
            private function instructionsButtonFunction(event:MouseEvent):void
            {
                instructionsButton.removeEventListener(MouseEvent.CLICK, instructionsButtonFunction);
                trace("instructions");
            }
            private function creditsButtonFunction(event:MouseEvent):void
            {
                creditsButton.removeEventListener(MouseEvent.CLICK, creditsButtonFunction);
                trace("credits");
            }
        }
    }
    

    In addition, anny comments on my coding habits and how to improve are welcome.

    in the hand

    var preloader: Preloader = new Preloader (();)

    preloader.addEventListener ("preloadCompleted", preloadCompletedF);

    in the Preloader, loading complete:

    this.dispatchEvent (new Event ("preloadCompleted"));

  • Help with utl_http and https API

    Hi all
    I am trying to write a pl/sql procedure to call the google translate API. I paid for a key and the url itself works without any problem, but I'm fighting to get my call from pl/sql.

    I created a function on my server as suggested by Billy Verreynne here: Re: error on HTTPS using UTL_HTTP

    It was extremely helpful as I can now see the url that goes to google.

    This is the code I use to call the function of Billy is:
    set serveroutput ON
    select * from TABLE(webbrowser('https://www.googleapis.com/language/translate/v2?key=mykeyblahblah&q=Automobile&source=en&target=ja')); 
    (1) my first question: Why am I get invited to enter variable bind by sqldeveloper? These are hard-coded in the url, I'm passing, so I don't know why I get invited to these.

    By Billy function, which is getting sent to google:
    HTTP: GET https://www.googleapis.com/language/translate/v2?key=mykeyblahblahAutomobile=Automobileen=enja=ja
    I'm getting ORA-29268: error the client HTTP 400 - Bad request, obviously from the url get passed to google makes no sense, i.e. the ampersands are get and removed the bind variable I entered replace the names of the parameters.

    (2) so my second question, what am I doing wrong and how can I get the URL to keep signs and identifiers in parameters?

    The first thing that is obvious is that I have a lot to learn here. There seems to be that many tutorials online to UTL_HTTP and even the docs of Oracle are a little sparse.

    For what it's worth my portfolio is ok and the proxy are set that correctly, so I know I'm getting to google, I'm just passing through a bad url.

    This isn't the last function, I'm just trying to take the baby steps so I just call the pl/sql API and retrieve a readable result. If anyone can help point me in the right direction, I would be very grateful.

    If it helps, here's the function I created using the code of Billy:
    create or replace
    function WebBrowser( url varchar2 ) return TStrings pipelined is
    --
    -- BASIC PL/SQL WEB BROWSER TEMPLATE
    -- supports http, https and proxy servers
     
            -- fixed constants
            C_NO_PROXY_FOR  constant varchar2(4000) := 'localhost';
            C_WALLET        constant varchar2(4000) := 'file:/blahblah';
            C_WALLET_PASS   constant varchar2(4000) := 'Welcome';
     
            -- Proxy settings that can be made arguments in the WebBrowser() call
            proxyServer     varchar2(30) := 'www-proxy.com';
            -- not all proxy servers use authentication, but many corporate proxies do, in
            -- which case you need to specify your auth details here
            -- (make it nulls if not applicable)
            proxyUser       varchar2(50) := NULL;
            proxyPass       varchar2(50) := NULL;
     
            -- our local variables
            proxyURL        varchar2(4000);
            request         UTL_HTTP.req;
            response        UTL_HTTP.resp;
            buffer          varchar2(4000);
            endLoop         boolean;
    begin
            -- our "browser" settings
            PIPE ROW( 'Setting browser configuration' );
            UTL_HTTP.set_response_error_check( TRUE );
            UTL_HTTP.set_detailed_excp_support( TRUE );
            UTL_HTTP.set_cookie_support( TRUE );
            UTL_HTTP.set_transfer_timeout( 30 );
            UTL_HTTP.set_follow_redirect( 3 );
            UTL_HTTP.set_persistent_conn_support( TRUE );
     
            -- set wallet for HTTPS access
            PIPE ROW( 'Wallet set to '||C_WALLET );
            UTL_HTTP.set_wallet( C_WALLET, C_WALLET_PASS );
     
            -- configure for proxy access
            if proxyServer is not NULL then
                    PIPE ROW( 'Proxy Server is '||proxyServer );
                    proxyURL := 'http://'||proxyServer;
     
                    if (proxyUser is not NULL) and (proxyPass is not NULL) then
                            proxyURL := REPLACE( proxyURL, 'http://',  'http://'||proxyUser||':'||proxyPass||'@' );
                            PIPE ROW( 'Proxy URL modified to include proxy user name and password' );
                    end if;
     
                    PIPE ROW( 'Proxy URL is '|| REPLACE(proxyURL,proxyPass,'*****') );
                    UTL_HTTP.set_proxy( proxyURL, C_NO_PROXY_FOR );
            end if;
     
            PIPE ROW( 'HTTP: GET '||url );
            request := UTL_HTTP.begin_request( url, 'GET', UTL_HTTP.HTTP_VERSION_1_1 );
     
            -- set HTTP header for the GET
            UTL_HTTP.set_header( request, 'User-Agent', 'Mozilla/4.0 (compatible)' );
     
            -- get response to the GET from web server
            response := UTL_HTTP.get_response( request );
     
            -- pipe the response as rows
            endLoop := false;
            loop
                    exit when endLoop;
     
                    begin
                            UTL_HTTP.read_line( response, buffer, TRUE );
                            if (buffer is not null) and length(buffer)>0 then
                                    PIPE ROW( buffer );
                            end if;
                    exception when UTL_HTTP.END_OF_BODY then
                            endLoop := true;
                    end;
     
            end loop;
            UTL_HTTP.end_response( response );
     
            return;
     
    exception when OTHERS then
            PIPE ROW( SQLERRM );
    end;
    Thank you!
    John

    John K. says:

    (1) my first question: Why am I get invited to enter variable bind by sqldeveloper? These are hard-coded in the url, I'm passing, so I don't know why I get invited to these.

    No bind variable. As bathtubs say these are substitution variables. Something that SQL * more supported for several year and something that is incorporated as a feature of some GUI for Oracle customers.

    Substitution variables are generally used in the installation scripts. You run a script (since SQL * the command-line) and passes command line parameter - these parameters are variables + & 1 + for the parameter 1, + & 2 + for the 2nd, etc..

    The script can then use these in the DDL statements (that do not support the bind variable) - e.g. create user & 1 identified by & 2....

    The customer to DEFINE in SQL command * more active/disable/configure the use of substitution variables. The default character to identify the variable substitution is "+ & +". So your problem with the URL being mutilated by your customer.

    I always use SET DEFINE OFF to disable the calendering customer my sending code on the server for execution. Another option is to use a different character to identify the substitution variables. The installation script Oracle Apex (quite large and quite complex) has the problem of the use of '&' in the code and need to also use substitution variables, as. So the installation uses the "+ ^ + ' character. I suggest to disable the substitution, or affecting a unusual as tank ' ^ ' or ' ~ '.

  • Help with a working script that will not convert pa player of higher version (As2)

    HI have a problem with a file that has been created for a long time to Fplayer v6 and when I now have 'upgrade' it to 8-9 or 10 it does not load the XML links ;/
    I have no idea why, the files works fine in the former player 6

    I have a set of xml files (Note: a file for each country on a map and the solution should not include to all links in the same xml file)

    the XML looks like this (example is for file Denmark called dk.xml): [code]

    …………………………………………………………………………………………………………

    < distribution >

    < history >

    www.Alink.com < /lead > < lead >

    < URL > http://www.Alink.com/ < / URL >

    < / history >

    < / distribution >

    …………………………………………………………………………………………………………

    So, in the flash file, I have a set of buttons do some actions
    action is call / spend a specific image in a MC in this framework, I have Xl loading stuff for each image (lable)
    [code]
    -.--------------------------------------------------------------------------------------- -----------

    headlineXML = new XML();
    headlineXML.onLoad = myLoad;

    headlineXML.load ("be.xml");
    function myLoad (ok) {}
                                 If (ok == true) {}
    Publish (this.firstChild);
                                 }
    }
    function Publish (HeadlineXMLNode) {}
    If (HeadlineXMLNode.nodeName.toUpperCase () == 'BROADCAST') {}
    Content = "";
    history = HeadlineXMLNode.firstChild;
    While (history! = null) {}
    if (story.nodeName.toUpperCase () == 'HISTORY') {}
                                 lead = "";
                                 URL = "";
    element = story.firstChild;
    While (element! = null) {}
    If (element.nodeName.toUpperCase () == 'LEAD') {}
    lead = element.firstChild.nodeValue;

                                                                                                                                                      }

    If (element.nodeName.toUpperCase () == 'URL') {}

    URL = element.firstChild.nodeValue;                                                                                                                   
    } element = element.nextSibling;

    }

    content += "< font size =" + 2' color = "#3366cc" > < a href = "" + URL + "" > "+ lead + ' < /a > < / police > < br >"+ body + "< br > < br >"; "

    content = txt.htmlText;
    }

    history = story.nextSibling;
    }

    }

    }
    ----------------------------------------------------------------------------------------- ----------------

    the button (main stage) lable framework calles the MC with the xml code that load the x definition load as well as a link in a box of dynamic txt (called 'txt'), has this code on this topic: [code]

    ----------------------------------------------------------------------------------------- -----------------

    on {(press)
                                 InfoOn ("DK");
    }

    on {(overview)
                                 DK._alpha = 50;
    }

    (releaseOutside, deployment, dragOut) {}
                                 DK._alpha = 100;
    }

    ----------------------------------------------------------------------------------------- -----------------

    so, as I said it works fine in FP 6 (as2) but when published on FP 8-9 or 10 only the XML does not load
    What could be the problem (I know it's old code and it is pretty poor and must be fully upgraded, but my)
    skills is not on that level, I managed to make it work before it of a few tutorials, but the editing issues
    is a little over my head
    J

    I would be very gratefull if someone could help me it's really frustrating, especially since the file actually works very well
    in the former player ;/

    The best

    OrsonB

    the two most common issues when converting to as2 vp 6 to as2 vp 6 + are:

    1. the failure to initialize a variable.  (if not explicitly initialized in vp 6, supposed to be zero.)  in vp +, he has an undefined.)

    2 vp6 is not case-senstive.  VP 6 + is broken.

    you have both.

    body is not defined and htmltext is not the same thing as htmlText.  Difficulty those and repeat the test.

  • Help with AS3 and buttons

    I need urgent help for a college project, I drew a map and I have a few photos that appear in terms of the timeline, one after the other. I want the timeline to be activated when I press a button on the sheet where I've been on vacation, but I have no idea of how to put together.

    While I can offer some ideas, you will need to spend time to find out how to use Flash... maybe get formal training with her.

    For photos, create each set as a movieclip and give to each movieclip an instance name so that you can control its visibility by using code.  Initially, you will want to set the visible property of them all to false, made probably in the first frame of the timeline (ex: imageGrp1.visible = false;).  Then, you use your buttons so that they are visible.

    Code on one of the buttons, you must assign an instance as well name.  Then, you must assign an event listener for this button to detect when it is selected and a function handler to go with the event listener, the listener calls the function in action when the event occurs.

    ex:

    the event listener for a button with an instance name of imgGrp1Button...

    imgGrp1Button.addEventListener (MouseEvent.CLICK, showGrp1);

    and function of event handler for the CLICK listener

    function showGrp1(evt:MouseEvent):void {}

    imageGrp1.visible = true;

    }

    If you want to hide any visible game when you select a new, then you can create a function that defines them all visible = false and the call that work well at first in 1 frame and each key event handler function (before setting the selected to be visible).

  • Help with JDBC stored functions

    Hello.. Im having problems with my stored functions (java oracle), where I create the functions but then im I call them, it does not return any value (nothing happens after that I called my function). Can someone help me?

    Here's how to create the registered function:

    /************************************************** ****************/
    create or replace FUNCTION insert_client_func (a_client_name IN CLIENTS.client_name%TYPE)

    RETURN VARCHAR2

    IS


    BEGIN

    INSERT INTO CUSTOMERS (client_name)

    VALUES (a_client_name);


    Return a_client_name;

    END;
    /************************************************** *****************/

    Heres how I call it:

    /************************************************** *****************/
    name = "'" + name + "'";

    Command string = "{call insert_client_func("+name+")}";

    try {}
    String url="jdbcracle:thin:@localhost:1521e; »
    this.dbConnection = DriverManager.getConnection (url, "bd2009", "bd2009");
    System.out.println (Command);
    This.callstmt = This.DbConnection.prepareCall (command d);
    this.callstmt.registerOutParameter (1, Types.VARCHAR);
    this.callstmt.executeUpdate ();
    String simpleArray = this.callstmt.getString (1);
    System.out.println (simpleArray);

    this.dbConnection.commit ();
    This.callstmt.Close ();
    this.dbConnection.close ();
    }
    /************************************************** *****************/

    The syntax of your call is incorrect. For functions, it should be

    "{ ? = call insert_client_func (?)} »

    You can also use the syntax of PL/SQL

    ' BEGIN?: = insert_client_func (a_client_name =>?); END; »

    Then configure your settings

    this.callstmt.registerOutParameter (1, Types.VARCHAR);
    this.callstmt.setObject(2, );

    What is the data type of IN_CLIENTS.client_name?

    Call the function and retrieve the return value

    This.callstmt.Execute ();
    String value = this.callstmt.getString (1);

  • Need help with WRT54G2 and network at home

    OK, I got the WRT54G for a long time and recently updated for the WRT54G2 but now can't access the file sharing and running Windows Vista from Windows XP using wireless.

    Here is my set upward,

    Desktop running Windows Vista connected to the router (that's the computer with folders and printers)

    2 - Windows XP laptop computer connected wireless

    All 3 are defined on the same workgroup can be seen on Windows XP machine when you go to, favorite network, also all can get on the internet.

    Any ideas what the problem might be? I'm guessing a setting somewhere but I was not able to find it.

    After a lot of research and help from this forum, I finally got to work, it was a firewall issue

    Thanks for the replies.

  • Replaced the hard drive, need help with drivers and utilities!

    Hello

    Yesterday, I replaced my old hard drive with a new WD, and I reinstalled Windows Vista.  Everything goes fine until I jumped in the utilities and drivers (Resource CD) supplied with the laptop.  I guess I thought that the CD all the work, would do to reinstall all the necessary drivers and utilities...  Now I'm stuck with a laptop computer that cannot connect to the internet, and the screen is too big.  I don't know there is more wrong with my laptop than meets the eye.  On the CD of drivers & utilities there the list of drivers and some of them have check marks, others do not.  I tried following some online course on which those who/what order to upload, but I don't even have some recommended drivers on the Dell.com site (specific to my Inpiron 1545 model)!  I know that I could download them immediately the site, but I don't even have wifi to do.

    In addition, I read the performance of a Dell Factory Image Restore and I tried it.  When I get the black screen with no option, I have to click on "Repair computer" but the option is not available either... I thought that maybe it would be an easy way to restore my laptop (readers and all) to the original settings.  Maybe the option is not there because my computer is practically empty, with nothing to restore? All I have on my laptop at the moment is Windows Vista 64 bits and drivers a couple that I don't know much.

    Bit of help and advice would be great.

    Anna

    Click on the link below, Guides of operating system Installation.

  • Need help with sizing and save files in batches

    Hi need help with a project.

    I have thousands of vector files that I need size of 350px X 350px, and then place it on a work plan x 600px-600px.

    Then I need to save it to the web as a PNG with a transparent background.

    Could I do a script for? or is there another way to do it in batches?

    I wouldn't have to open them one by one and resize the work plan then the image and save it one by one as that would take forever.

    Any help some suggestions would be greatly appreciated.

    ID do as a series of actions photoshop if the end result is png,

    pro image processor can help you make automatically, if you must resize batch additional... >

    https://sourceforge.NET/projects/PS-scripts/files/image%20Processor%20PRO/v3_2%20betas/

    I think that your work can run in a few steps, but for simplicity, I would like to start / test with a new photoshop action recording

    Open a file, change the size of the image to 350 x 350

    Change the canvas size,

    then save under...

  • Help with BC and Google maps integration

    Hi, I'm ready to go for paid British Colombia option so that I can have access to the web applications.  But before I go ahead, I have a few questions for someone who may be able to help.

    I build the site Muse adobe - this is not the last version of muse that I'm working on a windows computer 7.  All web applications in BC would work on the site for all is not the latest version?

    Also, what I'm really interested is to make an interactive map, pins etc. of construction at the back - is it tutorials that someone can point me to possibly help with a style to tell the little box pop up?  I looked at the muse HELP + BC and BC duo Dynamics Webinar on aidbc already, but I was wondering if there is more tutorials that would help.

    Also, is it possible to use a stylized map, or do you go with the default google map?  If you use a stylized map, how add you that to the web application of BC.

    Sorry for so many questions, but must know before you make the jump to a paid option of BC.

    Thanks so much for all those who can help you

    Michele

    HI Michelle,

    Muse can not and does not use or have access to all that's BC. It does not have access to things like e-commerce and Web applications in the sense of full capacity and put on the page. You can create interactive maps with the google API, web apps as a source of data, using the ability of location address lat and long or geo etc, but this isn't something you can do really Muse on its own.

  • help with LAG () AND dates

    I have at this moment the following query
      SELECT "DATE",
              "CELL_SITE",
              "LASTV_ATTCNT",
              "LASTV_ATTCNT2",
              "LASTV_BLKCNT",
              "LASTV_DRPCNT",
              "V_ATT_CNT",
              "V_CUST_BLK_CNT",
              "V_DRP_CALL_CNT",
              "LASTD_ATTCNT",
              "LASTD_BLKCNT",
              "LASTD_DRPCNT",
              "D_ATT_CNT",
              "D_CUST_BLK_CNT",
              "D_DRP_CALL_CNT"          
         FROM (  SELECT DATE,
                       CELL_SITE,
                        LAG (SUM (V_ATT_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_ATTCNT",
                        LAG (SUM (V_CUST_BLK_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_BLKCNT",
                        LAG (SUM (V_DRP_CALL_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_DRPCNT",
                        LAG (SUM (D_ATT_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_ATTCNT",
                        LAG (SUM (D_CUST_BLK_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_BLKCNT",
                        LAG (SUM (D_DRP_CALL_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_DRPCNT",
                        SUM (V_ATT_CNT) AS "V_ATT_CNT",
                        SUM (V_CUST_BLK_CNT) AS "V_CUST_BLK_CNT",
                        SUM (V_DRP_CALL_CNT) AS "V_DRP_CALL_CNT",
                        SUM (D_ATT_CNT) AS "D_ATT_CNT",
                        SUM (D_CUST_BLK_CNT) AS "D_CUST_BLK_CNT",
                        SUM (D_DRP_CALL_CNT) AS "D_DRP_CALL_CNT"
                   FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI
                  WHERE DATE >
                             (SELECT MAX (DATE) FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI)
                           - 2
               GROUP BY DATE, CELL_SITE)
        WHERE DATE >=
                 (SELECT MAX (DATE) - NUMTODSINTERVAL (12, 'HOUR')
                    FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI)
    What I've noticed, is that the LAG function is kind of what I want but not exactly. Let's say that I have given for the hours of 12: 00, 01:00, 02:00, 03:00 04:00, 05:00, 06:00, 07:00, 08:00, 09:00, 10:00, 11:00, 12:00 and the time is 12:00, the LAG function goes back to 12 h, which is what he should do.

    but lets say that I have given for 12 h, 01:00, 02:00, 03:00 04:00, 05:00, 07:00, 08:00, 09:00, 10:00, 11:00, 12:00, but it me MISSING at 06:00 (no data from 06:00). The lag function now back at 23:00 instead of 12 AM because the time 06:00 is missing.

    If I have data for 12: 00 01:00, 02:00, 03:00 04:00, 07:00, 08:00, 09:00, 10:00, 11:00, 12:00 and am MISSING 05:00 and 06:00, the data will return to 22:00 then and not only from 12: 00.

    Can I prevent this and always just come back in 12 hours?

    Published by: k1ng87 on April 25, 2013 13:27

    Hello

    k1ng87 wrote:

    ...
    LAG (SUM (V_ATT_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_ATTCNT",
    LAG (SUM (V_CUST_BLK_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_BLKCNT",
    LAG (SUM (V_DRP_CALL_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_DRPCNT",
    ...
    

    Since you want to so many columns of the same previous row, it would be probably easier and more effective to make a self-join, rather than so many functions of SHIFT.

    What I've noticed, is that the LAG function is kind of what I want but not exactly. Let's say that I have given for the hours of 12: 00, 01:00, 02:00, 03:00 04:00, 05:00, 06:00, 07:00, 08:00, 09:00, 10:00, 11:00, 12:00 and the time is 12:00, the LAG function goes back to 12 h, which is what he should do.

    You always pass 24 as 2nd argument offset; What does "Return the value of the line 24 of the precding." If there is a line for each hour, the current line is from 12:00, then wouldn't 24 ranks back would be from 12:00 yesterday, not 12 AM? Maybe you wanted to spend 12, not 24, as the second argument of LAG. I'll assume you really want the 24 line rom now on, but the technique is the same that that number either 24 or 12.

    but lets say that I have given for 12 h, 01:00, 02:00, 03:00 04:00, 05:00, 07:00, 08:00, 09:00, 10:00, 11:00, 12:00, but it me MISSING at 06:00 (no data from 06:00). The lag function now back at 23:00 instead of 12 AM because the time 06:00 is missing.

    If I have data for 12: 00 01:00, 02:00, 03:00 04:00, 07:00, 08:00, 09:00, 10:00, 11:00, 12:00 and am MISSING 05:00 and 06:00, the data will return to 22:00 then and not only from 12: 00.

    Can I prevent this and always just come back in 12 hours?

    A self-join would handle this automatically: it will look for the corresponding line, without regard for other lines may be present or absent.

    If you really had to do with the analytical functions, you can use MIN or FIRST_VALUE with a window of the range:

    RANGE BETWEEN  1 + (.5 / 24)  PRECEDING
          AND      1 - (.5 / 24)  PRECEDING
    

    DATE when you ORDER BY a column (do not call ' DATE'), the units are 1 day, so 1 + (.5/24) days ago is 24.5 hours; in other words, the window includes only DATES between 24.5 and 23.5 hours.

    If, for some reason, you really want to call LAG, so you could do an outer join to ensure that a row had been present for each of the previous 24 hours.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

Maybe you are looking for

  • iPhone 4S is stuck in the iTunes screen

    I recently reset my iPhone 4s, when I plug in my pic of windows vista, connect to iTunes that the phone appears on the screen of iTunes saying that I need to restore it, so I tried to restore and after a long while I get a message saying that iTunes

  • Time Machine does not

    I'm having a problem with Time Machine.  The program seems to be backing up my files correctly but when I run the application Time Machine so I can locate a file that I need to restore, I get a black box on the screen with a date on the right scroll

  • Satellite U400-22z - how to remove the HARD drive recovery partition

    Hallo, My satellite u400-22z came with a big "hdd recovery" folder on the drive hard - yes I know what it does.but the unbearably awful version of windows vista that came with the machine made me decide that, in the event of failure of the system, I'

  • URGENT, NEED HELP!

    Apparently, I have acrobat reader on my computer, & idk how to get it. Please, I'm trying to download the registration forms & need NOW! THX.

  • How to install scanner without installation disc?

    How to install Canon CanoScan N 656U for Win XP without the installation CD?