Need help recreating this in Oracle (Temporary Table and a Cursor)

Hey all,
My client has asked me to see if it's possible to move his SQL Queries into Oracle, and then move EVERYTHING off of MSSQL into this new oracle environment. The problem is, I wrote the entire MSSQL system, and i know nothing about Oracle.
Basically, I need some examples. I have been stumbling around Oracle for about a year now, so i'm 'somewhat' familiar with it.
Basically, i'm going to create a script/stored procedure that will first:
Create and define a temporary table that is used when the script/proc is called.
Then, thru cursors, i'm going to add a bunch of lines to it.
Finally, i'm going to Run a select statement against the temporary table we created.
Now, I can't create a table on the server, as the production environment will not allow it, so i need to be able to create this virtually inside the script, and then it automatically self destructs at the end of the script.
If anyone knows if this is possible, please post me a few links to examples, or just lay down the code to get the temprary table made.
We're using TOAD as the interface.
Thanks,
Dan

Thank you for the warm welcome.
The SQL looks something like this:
(Before you get lost in the code, this is an abreviation of the code, but every function is represented. This will also work in TOAD Script? I'm most worried about the use of how a Table is declared in Oracle, as i've seen many different versions of how to do this. Thanks)
~Dan
Declare @AREA nvarchar(50)
Declare @tmpTable Table (
     [AC_PROPERTY_ID] [INT] NULL,
     [PROPNUM] [nvarchar](50) NULL,
     [SORT_ORDER] [INT] NULL,
     [IS_TOTAL] [BIT] NULL,
     [FIELD] [nvarchar](200) NULL,
[AREA] [nvarchar](200) NULL,
     [ENG] [nvarchar](200) NULL,
     [RSV_CAT] [nvarchar](200) NULL,
     [WELL_NAME] [nvarchar](200) NULL,
     [SHORTS_PROGRAM] [nvarchar](15) NULL,
     [SHORT_MO] [nvarchar](6) NULL,
     [SHORTS_YR] [nvarchar](6) NULL,
     [SHORTS_DESC] [nvarchar](100) NULL)
Insert Into @tmpTable ([AC_PROPERTY_ID],[PROPNUM],[FIELD],[AREA],[ENG],[RSV_CAT],[WELL_NAME],[SHORTS_PROGRAM],[SHORT_MO],[SHORTS_YR],[SHORTS_DESC])
Select AC_PROPERTY_ID],[PROPNUM],[FIELD],[AREA],[ENG],[RSV_CAT],[WELL_NAME],[SHORTS_PROGRAM],[SHORT_MO],[SHORTS_YR],[SHORTS_DESC] from dbo.someoldtablenameimadeup where propnum>1000
     DECLARE idcursor cursor
     FOR
     Select Distinct AREA
     from @tmpTable
     Open idcursor
     Fetch Next from idcursor into @AREA
          While (@@FETCH_STATUS <> -1)
               BEGIN
               IF (@@FETCH_STATUS <> -2)
                    <Do stuff for each record in the cursor>
          FETCH NEXT FROM idcursor INTO @AREA
          END
          CLOSE idcursor
          DEALLOCATE idcursor

Similar Messages

  • Need help recreating this arrow pattern

    Hello,
    I need to essentially recreate the zig-zag arrow pattern shown in the banner below.  I am no photoshop expert and have spent the last couple hours messing around with it, and utilizing Google, but was unable to create a similar arrowhead size.  I am not exactly sure how to properly adjust the size of the arrow head and the width separately.  I used the line tool and created an arrowhead that way.  Then I would try and adjust the Width, Height, and Weight setting on the top panal, but was unable to obtain a similar ratio to the one below.  Either the body of the arrow was too thin, or when I tried to thicken it, it caused the arrowhead to become to large.  In addition, if you could help explain how to recreate the other lines throughout the banner that would be great.  A friend created this banner below for me, but I need to change the color of the arrow and the text.
    Can someone please assist me with this?  Thanks in advance!

    To reiterate what has already been said, the best option for you is to probably just recreate the arrow head as a separate shape. Since the shape is very simple, this is a quick and easy solution
    Here's a quick illustration of what Charles mentioned above:
    Select the Polygon Tool (if you can't see it, click and hold the Rectangle Tool to access the flyout menu)
    Change the Side count to 3
    Select your fill color
    Then, just click and drag to create your shape
    Also, a quick note - if you have access to it, Illustrator is probably a tool better suited to creating this kind of graphic. It lets you fine-tune lines and arrow heads to a greater extent then Photoshop.
    Cheers!
    Kendall

  • I need help recreating this logo.

    I am not sure how to recreate this logo. Not sure how to recreate the dots. Seems like a duplicate and rotate may work but I'm not exactly sure how to do that. Any help would be greatly appreciated! Please see the LINK BELOW!

    thesoundchurch,
    You may do it this way (Smart Guides are your friends, and you should have the centre Reference Point in the Transform palette selected):
    1) Create a stroke/nofill circle identical to the distance between the centres of the top and bottom largest dots;
    2) Create a fill/nostroke circle with a diameter (W = H) identical to the size of the largest dot;
    3) Ctrl/Cmd+C to create a copy of 2), then Object>Transform>Move horizontally by the distance between the centres of the largest dot and the smallest dot, then change the W or H in the Transform palette to the size of the smallest dot and press Ctrl/CmdEnter (to keep proportions);
    Now you have the paths at each end of the Blend to be;
    4) Object>Blend>Blend Options, set Spacing to Specified Steps and insert 6;
    5) Select both 2) and 3) and Object>Blend>Make;
    Now you have the Blend with equal spacing between centres;
    6) Move the Blend by the centre of the largest dot to the leftmost Anchor Point of the circle (Smart Guides say anchor when you are there);
    7) Select the circle and Ctrl/Cmd+C to create a copy, then multiply the W or H in the Transform palette by 1.1 or something to have the copy circle extend past the largest dot and press Ctrl/CmdEnter (to keep proportions);
    8) Select the Blend and the two circles and Ctrl/Cmd+G to Group them;
    9) Effect>Distort&Transform>Transform, set Rotate Angle to 6 and Copies to 44 or 45 (sorry, the 43 and 44 mentioned earlier were one short), 44 to have the same number as the logo (45), 45 (to a total of 46) if you wish to have a gap of 90 degrees;
    Now you should have all the dot rows;
    10) Object>Transform>Rotate by 132/135 degrees if you have 45/46 dot rows
    11) Drag across the circles in the gap with the Direct Selection Tool and change the Stroke to None at the bottom of the Toolbox.
    If you wish, you can create a copy and Object>Expand Appearance to only have the dot rows as paths.
    Always keep a copy of the full artwork before you destroy it.

  • How to use Oracle temporary table and verify if it exists

    1. I got two errors on the following code.
    ORA-06550: line 13, column 4:
    PLS-00428: an INTO clause is expected in this SELECT statement
    ORA-06550: line 17, column 3:
    PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
    2. Can I include this code in the create view statement?
    Thanks ahead, I am new to oracle dev world.
    ===========================================================
    DECLARE
    l_count NUMBER;
    BEGIN
    select count(*)
    into l_count
    from all_tables
    where table_name like 'TEMP_SHOW_STAFF_2%';
    if l_count > 0 then
    select * from TEMP_SHOW_STAFF_2;
    else
    create global temporary table TEMP_SHOW_STAFF_2
    (employee_id Number,
    last_name varchar(10),
    first_name varchar(10),
    salary_amount varchar(10))
    on COMMIT delete rows;
    end if;
    END;

    The PL/SQL User's Guide will have much more information, but as a quick example (new_dept is an empty table with the same structure as the DEPT table in the SCOTT schema).
      1  declare
      2    -- Create the type & declare a variable of that type
      3    type dept_arr_typ is table of dept%rowtype;
      4    dept_arr dept_arr_typ;
      5  begin
      6    -- Populate the type in memory
      7    select *
      8      bulk collect into dept_arr
      9      from dept;
    10    -- Manipulate the data
    11    for i in 1..dept_arr.count
    12    loop
    13      select 'foo'
    14        into dept_arr(i).dname
    15        from dual;
    16    end loop;
    17    -- Write the data back
    18    for i in 1..dept_arr.count
    19    loop
    20      insert into new_dept( deptno, dname, loc )
    21        values( dept_arr(i).deptno, dept_arr(i).dname, dept_arr(i).loc );
    22    end loop;
    23* end;
    SCOTT @ nx102 Local> /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    SCOTT @ nx102 Local> select * from new_dept;
        DEPTNO DNAME          LOC
            10 foo            NEW YORK
            20 foo            DALLAS
            30 foo            CHICAGO
            40 foo            BOSTONOf course, for this sort of thing, we could do everything in a single SQL statement
    INSERT INTO new_dept( deptno, dname, loc )
      SELECT deptno, 'foo', loc
        FROM dept;Collections can be handy if you need to apply a bit more conditional logic, though.
    Justin

  • I need help recreating this

    I would like to create something like this.
    I have tried myself and just got frustrated.  I made a custom shape and copied it and changed color, shape, direction and size. I made a symbol out of it and mapped it on a sphere shape but it just came out looking odd. I'm not sure what I need to do, maybe make a bigger symbol.
    Hopefully someone can help.
    Thanks in advance
    PC, CS5

    Close but you can do this either with the sybol spayer tool and symbol stainer tool or create a pattern and fill a shape with the pattern and make that filled shape a symbol.
    1. make one symbol and use the Symbol Sprayer to make your cluster you have too double click the tool to adjust the intensity etc.
    2. recolor that cluster using the Stainer tool.
    3. Make a 3D sphere and choose Map Art
    4. Choose Invisible Geometery and map art make sure yiour origianal half circle path has no stroke.
    5. Map your cluster symbol
    6 Alternat Make a pattern usig the Pattern Option Panel. you make several copies of the shape with different fills and make the pattern from that group
    7. Fill a shape witht he pattern and make it a ssymbol and follow steps 3-5
    One onther althernative is you can arrange the shapes manually as well and turn that group into a symbol as well
    I over did it here but

  • TopLink, use of Oracle Temporary tables

    A project using TopLink has the following questions. Could someone help answer them?
    Does TopLink support the use of Oracle Temporary tables?
    Is there any recommendation regarding the two possible ways of setting them up, see below:
    ON COMMIT Setting Description DELETE ROWS This creates a temporary table that is transaction specific. A session becomes bound to the temporary table with a transactions first insert into the table. The binding goes away at the end of the transaction. The database truncates the table (delete all rows) after each commit.
    PRESERVE ROWS This creates a temporary table that is session specific. A session gets bound to the temporary table with the first insert into the table in the session. This binding goes away at the end of the session or by issuing a TRUNCATE of the table in the session. The database truncates the table when you terminate the session.
    We appreciate your assistance.
    Haiwei

    Haiwei,
    TopLink has no explicit support for temporary tables but it should be possible. It is tough to answer your question since it really depends upon connection and transaction management for either case. What is your planned configuration TopLink with respect to external versus internal connection pooling as well as the JTA TX management.
    I believe you are deploying your applications within WebSphere but would just like to confirm that you are using WAS data sources and transaction management.
    Doug

  • Oracle temporary tables

    Hi ,
    we have a application for transfering data approx 1 million records from one schema to another. the data is first inserted into a table temporarily and after all the data is transfered the data is manually deleted from this table.
    we are planning to replace this table with Oracle Temporary table. Can you please let us know if this would increase the performance and why???
    Thanks & Regards
    Saroj

    In theory it should, but you won't know whether the difference is going to be noticeable until you try.
    Oracle has to do much less work with global temporary tables. It knows no other sessions will be using the data so it does not need to bother with rollback segments or locks. It also does not bother with redo because there will not be a need to recover.

  • Need help in configuring the Oracle app server with OC DB Server

    Hello people
    I attempted to insta;; Oracle Clinical 4.5 and I have a problem that you mayhave resolved a long time back and I need some help. This is what I have done on the installation.
    I need your help in centralizing my tnsnames.ora and sqlnet.ora files. I am an Oracle Clinical guy and not an Oracle Expert, hence the request.
    Part_1
    1. Installed Oracle 9i 9.2 database on Win2K server - W2kOCSVR
    2. Installed Oracle Clinical 4.5 and created DB on W2KOCSVR.
    3. Started up database and all is fine - tnsnames and sqlnet.ora
    4. Each of these is on a separate partition including the OS.
    Part-II
    1. Installed Oracle Appl Server 9iAs 1.0.2.2.2a on another machine OCMIDTIER. This installed Oracle iSuites home and stuff.
    2. Then I installed Oracle 9i developer suite - Oracle forms and reports.
    3. Installed Jinitiator 1.1.8.24 on the middle tier machine.
    4. Basically this is the middle tier that is a Webserver that will be linked to the Database Server in Part-I
    and lastly, I will have web clients with Jinitiator and a web browser.
    Requirement:
    I need to centralize the TNSNAMES.ora file and the SQLNET.ora file on all the machines. How do I do this?.
    I have the TNSNAMES.ora and the SQLNET.ora on DB server and it is working fine. However, I have noticed many tsnnames.ora files on the middle tier - OCMIDTIER. (I've left out the example files)
    a) E:\ORACLE\806\net80\admin\tnsnames.ora
    b) E:\ORACLE\806\net80\tnsapi\tnsnames.ora
    c) E:\ORACLE\iSuites\hs\admin\tnsnames.ora
    d) E:\ORACLE\iSuites\network\admin\tnsnames.ora
    All I need to know is which if these files do I need to integrate with the Tnsnames.ora file on the DB server - W2kOCSVR and how do I go about doing this?.
    Your help is appreciated. If I were to see a copy of your tnsnames.ora on the webserver (middle tier) and the sqlnet.ora, I will be able to get an idea of how this is done. Right now, I am using tnsnames.ora but once I learn how this ties up, I can move to names sever.
    Thanks for your help.
    Cecil

    Hi Cecil,
    I got into the same issue. I copied the content from the good tnsnames.ora to tnsnames.ora on webserver and it worked fine. I copied the details of the connect string that was working fine on dbserver. i was working on W2k server. Hope this helps
    Gonnagar

  • I need help on This SQL problem ASAP :)

    Hi All,
    I need help on this....
    I have a table...
    Say table name: one
    with these values
    premnum status
    1234 C
    1234 F
    1234 P
    1234 F
    5678 C
    5678 F
    5678 P
    9112 C
    9112 F
    9112 P
    9112 F
    3456 C
    3456 F
    3456 P
    7890 C
    7890 P
    7890 F
    Now, I want to output only those premnum with status = 'C' and those premnum with Status 'F' having a count > 1 (with two status = 'F')
    So the output would be something like this
    premnum status
    1234 C
    1234 F
    1234 F
    5678 C
    9112 C
    9112 F
    9112 F
    3456 C
    7890 C
    I really need help on this asap...
    I need the SQL statement on this....
    Thank you in advance. :)
    Edited by: 804697 on Oct 23, 2010 9:45 PM

    Hi,
    you can use the following query.
    CREATE TABLE PREM_TEST ( premnum NUMBER , STATUS VARCHAR2(1));
    INSERT INTO PREM_TEST VALUES(1234 ,'C');
    INSERT INTO PREM_TEST VALUES(1234 ,'F');
    INSERT INTO PREM_TEST VALUES(1234 ,'P');
    INSERT INTO PREM_TEST VALUES(1234 ,'F');
    INSERT INTO PREM_TEST VALUES(5678 ,'C');
    INSERT INTO PREM_TEST VALUES(5678 ,'F');
    INSERT INTO PREM_TEST VALUES(5678 ,'P');
    INSERT INTO PREM_TEST VALUES(9112 ,'C');
    INSERT INTO PREM_TEST VALUES(9112 ,'F');
    INSERT INTO PREM_TEST VALUES(9112 ,'P');
    INSERT INTO PREM_TEST VALUES(9112 ,'F');
    INSERT INTO PREM_TEST VALUES(3456 ,'C');
    INSERT INTO PREM_TEST VALUES(3456 ,'F');
    INSERT INTO PREM_TEST VALUES(3456 ,'P');
    INSERT INTO PREM_TEST VALUES(7890 ,'C');
    INSERT INTO PREM_TEST VALUES(7890 ,'P');
    INSERT INTO PREM_TEST VALUES(7890 ,'F');
    SELECT     PREMNUM , STATUS
    FROM     PREM_TEST
    WHERE     STATUS = 'C'
    OR          (PREMNUM , STATUS ) IN (     SELECT PREMNUM , STATUS
                                                 FROM     PREM_TEST
                                                 WHERE     STATUS = 'F'
                                                 GROUP BY PREMNUM , STATUS
                                                 HAVING COUNT(*) > 1
    PREMNUM S
    1234 C
    1234 F
    1234 F
    5678 C
    9112 C
    9112 F
    9112 F
    3456 C
    7890 C
    9 rows selected.

  • My Mac was updated to Ÿosemite OS and since then the PS5 software doesn't open. I need help on this subject please.

    My Mac was updated to Ÿosemite OS and since then the PS5 software doesn't open. I need help on this subject please.
    They error message I get is "An unexpected and unrecoverable problem has occurred. Photoshop will now exit."
    This only started after I upgraded my OS to Yosemite.

    The upgrade has been know to break Photoshop CS5 installs. An Uninstall/Reinstall may be necessary.

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
    For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
    See: 
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html  
    Be well...

  • I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues vision 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    For MS Visio (any version) only the appropriate version of Acrobat *PRO* provides PDFMaker for Visio.
    For Visio 2013 specifically you must have Acrobat XI Pro (updated to at least 11.0.1).
    See: 
    http://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html  
    Be well...

  • Need help with this xml gallery !!!

    i have build a gallery but its very simple...... it takes images from xml file.
    i have attached all files in zip.
    i just want two things if anyone can help.
    first when i press next button it goes to next image but with no effect. it just displays next image ... i want to incorporate a sliding effect when the image is changed to another.
    and second i want to use autoplay feature.
    as soon as swf starts the images came one by one with difference of few seconds.
    thx in advance... i really need help in this....!

    You're welcome.
    I don't have an example to offer for the autorun.  You should be able to think it thru.  One key, as I mentioned is to preload all of the images first, that will allow for smooth playing of the show--no waiting for images to load between changes.  You can load them into empty movieclips and hide them (_viisible = false) until they are needed.  You could load them when called for, but you would have to put conditions on the displaying of things until the image loads, which will change when they are all loaded, so I recommend just loading them all first.
    For the timing you can use setInterval.  If something is going to be allowed to interupt the autorun, then you will need to make use of the clearInterval function as well, so that you stop the clock.
    Since you will be wanting to know when things are loaded, you will need to use the MovieClipLoader.loadClip method for loading the images instead of using loadMovie.  This is because the MovieClipLoader class supports having an event listener.  If you look in the help documents in the MovieClipLoader.addListener section, there is an example there that provides a fairly good complete overview of using the code.  The only difference is you'd be looking for the onLoadComplete event rather than the onLoadInit event.

  • Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Thanks

    Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Apple support says I have to pay £85 for to help me. Thanks

    Just a word of advice. Never ever use the word "urgent" on this forum

Maybe you are looking for

  • MobileMe, .Mac, PPC, and iCloud -- oh my!  Am I doing this right?

    OK, hopefully, I'm not making this more complicated than it is. Right now I have: a ".mac" account that I use as my Apple ID because that's what I started purchasing items with in the Apple store before MobileMe came out.  So all iTunes purchases, mu

  • Why is my clients Muse site not exporting images properly?

    Well I have just uploaded my clients website and the images don't seem to be displaying correctly look here and you will see what I mean http://www.butterfliesbridal.co.uk/ it isn't just one image it's quite a few however they work on my Business cat

  • Signal Processing and LabVIEW Expert Full Time Position – London, UK

    1x Signal Processing and LabVIEW Expert - Full Time Position – London, UK 1.0      Description: As a Signal Processing/Software Engineer, you'll be part of a team that is responsible for developing applications based on large high speed data analysis

  • Firmware Update 4.2.8 Fails on PowerMac G4

    Hello, Concerning a Powermac G4 running 9.2.2 & attempting to upgrade to 10.3 (which requires the firmware update): Removed all attachments except mouse, monitor and keyboard. Ran firmware update 4.2.8 (for 2 x 450 mHz PPC AGP Graphics Powermac G4).

  • Update - can i get rid of it?

    Is there any way to uninstall this latest update?  it's awful....I made the mistake of installing and regret it.  too many problems to list...