Why won't this MERGE statement work?

I am testing out a MERGE statement, which contains a subquery that will return no rows...on this condition, it should insert a record; however I get 0 records merged. Why is this?
Ultimately, the hard-coded values will actually be passed in as parameters. If those a record with those four values is not found, then it should insert.
MERGE INTO tb_slea_election_worksheet A
USING 
(SELECT i.slea_year,i.empid,i.bda_sum_sort,i.bda_dtl_sort FROM tb_slea_election_worksheet i
WHERE  slea_year = '2008'
AND empid = '6468T'
AND bda_sum_sort = '30'
AND bda_dtl_sort = '9999'
) B
ON (A.slea_year = B.slea_year
AND A.empid =B.empid
AND A.bda_sum_sort  = B.bda_sum_sort
AND A.bda_dtl_sort  = B.bda_dtl_sort) 
WHEN MATCHED THEN
  UPDATE SET A.fa_proj_exp_amt  = 888
WHEN NOT MATCHED THEN
  INSERT    (slea_year,empid,bda_sum_sort,bda_dtl_sort,act_exp_lst_yr,fa_proj_exp_amt)
  VALUES ( '2008','6468T','30','9999','0','55');

A merge statement is just a much more efficient way of doing something like this pl/sql block
DECLARE
   l_n NUMBER;
BEGIN
   FOR r IN (SELECT pk, col1, col2 FROM source) LOOP
      BEGIN
         SELECT 1 INTO l_n
         FROM target
         WHERE pk = r.pk;
         UPDATE target
         SET col1 = r.col1,
             col2 = r.col2
         WHERE pk = r.pk;
      EXCEPTION WHEN NO_DATA_FOUND THEN
         INSERT INTO target
         VALUES(r.pk, r.col1, r.col2);
      END;
   END LOOP;
END;So, if the select from source returns no rows, nothing is going to happen.
John

Similar Messages

  • Why won't combined AND statement work

    I want to exclude records based on two criteria's: status = 'M' and the status reason = 52.
    The table contains records with status = 'M' and status reason other than 52.
    Also the table contains records with status other than 'M' and status reason = 52 and I want to include those records.
    I first tried using the statement below reasoning that placing the two criteria's in parenthesis would combine them and only exclude records with M 52
    Where (nvl(Status_CD,'A') <> 'M' AND nvl(STATUS_RESN_CD,0) <> 52 )
    However the query removed all records with Status_CD 'M' and all records with Status_Resn_CD 52. 
    Using the Where Not statement worked.
    Where Not (External_Status_CD = 'M' and EXT_STAT_RESN_CD = 52 ) 
    I’m curious why the first statement didn’t work?
    Can anyone explain why the first query didn't combine the 2 statements but a Where Not did?
    Thank you - Mark

    HI, Mark,
    markjames9 wrote:
    I want to exclude records based on two criteria's: status = 'M' and the status reason = 52.
    The table contains records with status = 'M' and status reason other than 52.
    Also the table contains records with status other than 'M' and status reason = 52 and I want to include those records.
    I first tried using the statement below reasoning that placing the two criteria's in parenthesis would combine them and only exclude records with M 52
    Where (nvl(Status_CD,'A') <> 'M' AND nvl(STATUS_RESN_CD,0) <> 52 )
    However the query removed all records with Status_CD 'M' and all records with Status_Resn_CD 52.
    Using the Where Not statement worked.
    Where Not (External_Status_CD = 'M' and EXT_STAT_RESN_CD = 52 ) 
    I’m curious why the first statement didn’t work?
    Can anyone explain why the first query didn't combine the 2 statements but a Where Not did?
    Thank you - Mark
    Another way of looking at it:
    The condition (x AND y) will be TRUE when both x AND y are TRUE.
    If
    sub-condition x is    nvl (Status_CD, 'A') <> 'M'   and
    sub-condition y is  nvl (STATUS_RESN_CD, 0) <> 52
    then any row with status_cd = 'M' fails sub-condition x, therefore the compound condition is FALSE, regardless of status_resn_cd.
    Likewise, and row with status_resn_cd=52 fails sub-condition y, so the compound condition is FALSE regardless of status_cd.
    You used status_cd and status_resn_cd in one example; but
    EXTERNAL_status_cd and EXT_stat_resn_cd in the other.  That's quite confusing.  Also, you'll confuse everyone (including yourself) if status is abbreviated as stat in some places but not in others.  Either way is okay, but be consistent.  The same goes for abbreviating external as ext; pick one or the other, and use the same word in all places.
    Don't forget to check for NULLs.  If  external_status_cd and ext_stat_resn_cd can be NULL, you should say
    Where Not (    NVL (External_Status_CD, 'A') = 'M'
              and  NVL (EXT_STAT_RESN_CD,    0)  = 52
    depending on your requirements.

  • Why doesn't this case statement work?

    SELECT
    case when PRODUCTS.PRODUCT_NAME in
    select case when rank() over(order by ( sum(ag.RX_CNT) ) desc) < 6 then ( p.PRODUCT_NAME ) else 'XXXX' END RankedProduct
    FROM
    PAP_MONTHLYTIME_DIM m,
    PAP_PRESCRIPTIONS_DEMOG_AGG ag,
    PRODUCTS p,
    PAP_ENROLLMENT_FLAGS_DIM f
    WHERE
    ( m.MONTHLYTIME_DIM_ID = ag.MONTHLYTIME_DIM_ID )
    AND ( ag.ENROLLMENT_FLAGS_DIM_ID = f.ENROLLMENT_FLAGS_DIM_ID )
    AND ( p.PRODUCT_ID = ag.PRODUCT_DIM_ID )
    AND ( f.ACTIVE_FLAG = 'Y' )
    AND m.CALENDAR_YEAR_MONTH = '2007-04'
    GROUP BY
    m.MONTH_END_DATE,
    p.PRODUCT_NAME
    then
    ( PRODUCTS.PRODUCT_NAME ) else 'All Other' end as ProdNm,
    PRODUCTS.PRODUCT_NAME,
    sum(PAP_PRESCRIPTIONS_DEMOG_AGG.RX_CNT)
    FROM
    PRODUCTS,
    PAP_PRESCRIPTIONS_DEMOG_AGG
    WHERE
    ( PRODUCTS.PRODUCT_ID=PAP_PRESCRIPTIONS_DEMOG_AGG.PRODUCT_DIM_ID )
    GROUP BY
    PRODUCTS.PRODUCT_NAME
    The first case statement is not working properly. First off - I know I can do this without the subquery in the case statement, but it's then tied to the Month and I don't want that.
    The result set of the subquery contains valid product_names that match EXACTLY (I added LTRIM RTRIM just in case), but the ProdNm field still evaluates to "All Other" for them. If I change the subquery to something basic and remove the rank function, it works, but of course I need that function. My understanding is that it shouldn't matter what function is in the subquery. I thought Oracle would get the result set of the subquery first, then evaluate the case statement based on the result set (the subquery is obviously not correlated).
    Any ideas?
    Thanks.

    My understanding is that it shouldn't matter what function is in the subquery. I thought Oracle would get the result set of the subquery first, then evaluate the case statement based on the result set (the subquery is obviously not correlated). It looks like the queries ARE somehow correlated. Consider the two simplified queries:
    michaels>  SELECT   ename, deptno,
             CASE
                WHEN deptno IN (
                       SELECT CASE
                                 WHEN ROW_NUMBER () OVER (ORDER BY NULL) < 3
                                    THEN deptno
                                 ELSE 1000
                              END
                         FROM dept)
                   THEN 'Found'
                ELSE 'NOT Found'
             END FOUND
        FROM emp
    ORDER BY deptno
    ENAME          DEPTNO FOUND   
    CLARK              10 NOT Found
    KING               10 NOT Found
    MILLER             10 NOT Found
    JONES              20 NOT Found
    FORD               20 NOT Found
    ADAMS              20 NOT Found
    SMITH              20 NOT Found
    SCOTT              20 NOT Found
    WARD               30 NOT Found
    TURNER             30 NOT Found
    ALLEN              30 NOT Found
    JAMES              30 NOT Found
    BLAKE              30 NOT Found
    MARTIN             30 NOT Found
    michaels>  SELECT   ename, deptno,
             CASE
                WHEN deptno IN (
                       SELECT *
                         FROM (SELECT CASE
                                         WHEN ROW_NUMBER () OVER (ORDER BY NULL) < 3
                                            THEN deptno
                                         ELSE 1000
                                      END
                                 FROM dept))
                   THEN 'Found'
                ELSE 'NOT Found'
             END FOUND
        FROM emp
    ORDER BY deptno
    ENAME          DEPTNO FOUND   
    CLARK              10 Found   
    KING               10 Found   
    MILLER             10 Found   
    JONES              20 Found   
    FORD               20 Found   
    ADAMS              20 Found   
    SMITH              20 Found   
    SCOTT              20 Found   
    WARD               30 NOT Found
    TURNER             30 NOT Found
    ALLEN              30 NOT Found
    JAMES              30 NOT Found
    BLAKE              30 NOT Found
    MARTIN             30 NOT FoundSo in the first query ROW_NUMBER() evaluates to NULL (not sure why) so the condition will never be satisfied! This is easily proofed when actually testing for nullity:
    WHEN ROWNUM() OVER (ORDER BY NULL) IS NULL THEN
    ...will always show 'Found'!
    Inlining the subquery »materializes« it, and ROW_NUMBER() gets the desired value.

  • Why won't this html code work????

    I used iWebMore to convert my html paypal buttons before posting to the server. (I don't use .mac). When I tried this code, it won't convert from code with iwebMore. Is there another way to convert html that's better than this? Here's the code:
    <script type="text/javascript"
    src="http://ss.webring.com/navbar?f=j;y=tokay;u=defurl1"></script>
    <noscript><center><table bgcolor=gray cellspacing=0 border=2 bordercolor=red>
    <tr><td><table cellpadding=2 cellspacing=0 border=0><tr><td align=center>
    This site is a member of WebRing.
    To browse visit
    here.</td></tr></table></td></tr></table></center></noscript>

    did you add the <@::@> to the SHAPE?
    you need to create a rounded box. then using the inspector - remove ALL fill and stroke and shade of ANY KIND. WETHER TO TEXT OR THE SHAPE ITSELF!
    now paste in the following in the shape:
    <@::@>
    replace the apple symbol () with the javascript.
    THEN EMTPY YOUR CACHE!
    max

  • Why won't this contact form work?

    Hi All,
    Ok so i decided to update the contact form of page below as i was using the out dated spry validation method. I inserted the new contact form using webassist dreamweaver extension but i am now having big problems with this page. I am now unable to even open the page, please use link below to see the page error and i have also pasted the code of this page.
    http://www.milesfunerals.com/contact.php
    <?php virtual("/webassist/form_validations/wavt_scripts_php.php"); ?>
    <?php virtual("/webassist/form_validations/wavt_validatedform_php.php"); ?>
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Miles &amp; Daughters | Contact us by email or phone</title>
    <meta name="description" content="Contact us and speak to any of our friendly staff if you have any enquiries or if you would prefer you can contact us by email. You can also see pictures of all five of our branches. ">
    <meta name="keywords" content="contact, questions, enquiries, friendly, email, addresses, write, funeral home, branches, reading, wokingham, crowthorne, twyford, bracknell">
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link href="/stylesheet.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="fancyBox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script type="text/javascript" src="fancyBox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $('.fancybox').fancybox();
    </script>
    <style type="text/css">
    #sprytextfield2{
               form input[type=text] {width: 75%}
    textarea {width: 85%}
    #sprytextfield1{
               form input[type=text] {width: 75%}
    textarea {width: 85%}
    </style>
    <LINK REL="SHORTCUT ICON" HREF="http://www.milesmemorials.com/favicon.ico">
    <script src="/webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
    <link href="/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    <script src="/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="/webassist/forms/wa_servervalidation.js" type="text/javascript"></script>
    <link href="/webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="container">
    <?php include('includes/header.php'); ?>
    <?php include('includes/navbar2.php'); ?>
    <?php include('includes/navbar.php'); ?>
    <?php include('includes/sidebar.php'); ?>
    <div id="maindiv" class="maindiv_scroll">
      <p> </p>
      <p> </p>
        <p class="subheading">Miles and Daughters - Contact us</p>
      <p class="sub2">Addresses and telephone numbers for our offices are:</p>
    <p class="maintext"> </p>
    <p class="wokingham"><span class="address"><a class="fancybox" href="images/Isabella house.jpg" title="Miles & Daughters Winnersh Premises"><img src="images/Isabella house.jpg" alt="Miles &amp; Daughters Wokingham premisesh" width="297" height="263" class="shop"/></a></span> </p>
    <p class="wokingham"> </p>
    <p class="wokingham">Wokingham</p>
    <p class="address">Isabella House  </p>
    <p class="address">498a Reading Road</p>
      <p class="address"> Winnersh </p>
      <p class="address">Berkshire</p>
      <p class="address"> RG41 5EX</p>
      <p class="address"> Telephone: 0118 979 3004</p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"><a class="fancybox" href="images/cav-1.jpg" title="Miles & Daughters Reading Premises"><img src="/images/cav-1.jpg" alt="Miles &amp; Daughters Reading premises" width="380" height="321" class="shop"/></a></p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="wokingham">Reading</p>
    <p class="address">Tamela House</p>
      <p class="address">157-161 Caversham Road</p>
      <p class="address">Reading</p>
      <p class="address">Berkshire</p>
      <p class="address">RG1 8BB</p>
      <p class="address">Telephone: 0118 959 0022</p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"><a class="fancybox" href="images/Ivydene2.jpg" title="Miles & Daughters Binfield Premises"><img src="images/Ivydene2.jpg" alt="Miles &amp; Daughters Bracknell premises" width="380" height="267" class="shop"/></a></p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham">Bracknell</p>
      <p class="address">Ivydene House</p>
      <p class="address">Forest Road</p>
      <p class="address">Binfield</p>
      <p class="address">Bracknell</p>
      <p class="address">RG42 4HP</p>
      <p class="address">Telephone: 01344 452020  </p>
      <p class="wokingham"><span class="address"><a class="fancybox" href="images/twford.jpg" title="Miles & Daughters Twyford Premises"><img src="images/twford.jpg" alt="Miles &amp; Daughters Twyford premises" width="263" height="317" class="shop"/></a></span></p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
      <p class="wokingham">Twyford</p>
    <p class="address">The Old Clock House</p>
      <p class="address">Station Road</p>
      <p class="address"> Twyford</p>
      <p class="address">Berkshire </p>
      <p class="address">RG10 9NS</p>
      <p class="address"> Telephone: 0118 934 5474</p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"><a class="fancybox" href="images/crowthorne.jpg" title="Miles & Daughters Crowthorne Premises"><img src="images/crowthorne.jpg" alt="Miles &amp; Daughters Crowthorne premises" width="362" height="239" class="shop"/></a></p>
      <p class="wokingham"> </p>
      <p class="wokingham"> </p>
        <p class="wokingham">Crowthorne</p>
    <p class="address">Alicya House</p>
      <p class="address">105 High Street</p>
      <p class="address"> Crowthorne</p>
      <p class="address">Berkshire </p>
      <p class="address">RG45 7AD</p>
      <p class="address"> Telephone: 01344 774932</p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="address"> </p>
      <p class="endtext"> </p>
      <p class="endtext"> </p>
      <p class="maintext">You may email us or alternatively use the form below to contact us, one of our members of staff will respond as soon as possible.  </p>
      <p> </p>
      <div id="SimpleContact_Basic_Default_ProgressWrapper">
        <form class="Basic_Default" id="SimpleContact_Basic_Default" name="SimpleContact_Basic_Default" method="post" action="form-to-email.php">
          <!--
    WebAssist CSS Form Builder - Form v1
    CC: Contact
    CP: Simple Contact
    TC: Basic
    TP: Default
    -->
          <ul class="Basic_Default">
            <li>
              <fieldset class="Basic_Default" id="Contact_me">
                <legend class="groupHeader">Contact</legend>
                <ul class="formList">
                  <li class="formItem"> <span class="fieldsetDescription"> Required * </span> </li>
                  <li class="formItem">
                    <div class="formGroup">
                      <div class="lineGroup">
                        <div class="fullColumnGroup">
                          <label for="Full_Name" class="sublabel" > Name:<span class="requiredIndicator"> *</span></label>
                          <div class="errorGroup">
                            <div class="fieldPair">
                              <div class="fieldGroup"> <span id="Full_Name_Spry"> <span>
                                <input id="Full_Name" name="Full_Name" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("formtoemail","Full_Name"):"")); ?>" class="formTextfield_Large" tabindex="1" onBlur="hideServerError('Full_Name_ServerError');">
                                <span class="textfieldRequiredMsg">Please enter your name</span> </span> </span>
                                <?php
    if (ValidatedField('formtoemail','formtoemail'))  {
      if ((strpos((",".ValidatedField("formtoemail","formtoemail").","), "," . "1" . ",") !== false || "1" == ""))  {
        if (!(false))  {
    ?>
                                  <span class="serverInvalidState" id="Full_Name_ServerError">Please enter your name</span>
                                  <?php //WAFV_Conditional form-to-email.php formtoemail(1:)
    }?>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="lineGroup">
                        <div class="fullColumnGroup">
                          <label for="Email_Address" class="sublabel" > Email:<span class="requiredIndicator"> *</span></label>
                          <div class="errorGroup">
                            <div class="fieldPair">
                              <div class="fieldGroup"> <span id="Email_Address_Spry"> <span>
                                <input id="Email_Address" name="Email_Address" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("formtoemail","Email_Address"):"")); ?>" class="formTextfield_Large" tabindex="2" onBlur="hideServerError('Email_Address_ServerError');">
                                <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldRequiredMsg">Please enter a full email address</span> </span> </span>
                                <?php
    if (ValidatedField('formtoemail','formtoemail'))  {
      if ((strpos((",".ValidatedField("formtoemail","formtoemail").","), "," . "2" . ",") !== false || "2" == ""))  {
        if (!(false))  {
    ?>
                                  <span class="serverInvalidState" id="Email_Address_ServerError">Please enter a full email address</span>
                                  <?php //WAFV_Conditional form-to-email.php formtoemail(2:)
    }?>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="lineGroup">
                        <div class="fullColumnGroup">
                          <label for="Comments" class="sublabel" > Comments:</label>
                          <div class="errorGroup">
                            <div class="fieldPair">
                              <div class="fieldGroup"> <span>
                                <textarea name="Comments" id="Comments" class="formTextarea_Medium" rows="1" cols="1" tabindex="3"><?php echo((isset($_GET["invalid"])?ValidatedField("formtoemail","Comments"):"")); ?></textarea>
                              </span> </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </li>
                  <li class="formItem">
                    <div class="formGroup">
                      <div class="lineGroup">
                        <div class="fullColumnGroup">
                          <div class="fullColumnGroup">
                            <label for="Security_Code" class="sublabel" > </label>
                            <div class="errorGroup">
                              <div class="fieldPair">
                                <div class="fieldGroup"> <span> <img src="/webassist/captcha/wavt_captchasecurityimages.php?field=Security_Code&amp;noisefreq= 15&amp;noisecolor=060606&amp;gridcolor=080808&amp;font=fonts/MOM_T___.TTF&amp;textcolor=04 0404" alt="Security Code" class="Captcha"> </span> </div>
                              </div>
                            </div>
                          </div>
                          <div class="fullColumnGroup" style="clear:left;">
                            <label for="Security_Code" class="sublabel" > Security code:<span class="requiredIndicator"> *</span></label>
                            <div class="errorGroup">
                              <div class="fieldPair">
                                <div class="fieldGroup"> <span id="Security_Code_Spry"> <span>
                                  <input id="Security_Code" name="Security_Code" type="text" value="" class="formTextfield_Large" tabindex="4" onBlur="hideServerError('Security_Code_ServerError');">
                                  <span class="textfieldRequiredMsg">Entered text does not match; please try again</span> </span> </span>
                                  <?php
    if (ValidatedField('formtoemail','formtoemail'))  {
      if ((strpos((",".ValidatedField("formtoemail","formtoemail").","), "," . "3" . ",") !== false || "3" == ""))  {
        if (!(false))  {
    ?>
                                    <span class="serverInvalidState" id="Security_Code_ServerError">Entered text does not match; please try again</span>
                                    <?php //WAFV_Conditional form-to-email.php formtoemail(3:)
    }?>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="lineGroup">
                        <div class="fullColumnGroup">
                          <div class="fullColumnGroup">
                            <label for="Security_Answer_2" class="sublabel" > </label>
                            <div class="errorGroup">
                              <div class="fieldPair">
                                <div class="fieldGroup"> <span> <span class="precedingText">
                                  <?php virtual("/webassist/captcha/wavt_captchasecurityquestion.php"); ?>
                                </span> </span> </div>
                              </div>
                            </div>
                          </div>
                          <div class="fullColumnGroup" style="clear:left;">
                            <label for="Security_Answer" class="sublabel" > Answer:<span class="requiredIndicator"> *</span></label>
                            <div class="errorGroup">
                              <div class="fieldPair">
                                <div class="fieldGroup"> <span id="Security_Answer_Spry"> <span>
                                  <input id="Security_Answer" name="Security_Answer" type="text" value="" class="formTextfield_Large" tabindex="5" onBlur="hideServerError('Security_Answer_ServerError');">
                                  <span class="textfieldRequiredMsg">Incorrect
                                    response; please try again</span> </span> </span>
                                  <?php
    if (ValidatedField('formtoemail','formtoemail'))  {
      if ((strpos((",".ValidatedField("formtoemail","formtoemail").","), "," . "4" . ",") !== false || "4" == ""))  {
        if (!(false))  {
    ?>
                                    <span class="serverInvalidState" id="Security_Answer_ServerError">Incorrect
                                      response; please try again</span>
                                    <?php //WAFV_Conditional form-to-email.php formtoemail(4:)
    }?>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </li>
                  <li class="formItem"> <span class="buttonFieldGroup" >
                    <input id="Hidden_Field" name="Hidden_Field" type="hidden" value="<?php echo((isset($_GET["invalid"])?ValidatedField("formtoemail","Hidden_Field"):"")); ?>">
                    <input class="formButton" name="SimpleContact_submit" type="submit" id="SimpleContact_submit" value="Contact me"  onClick="clearAllServerErrors('SimpleContact_Basic_Default')">
                  </span> </li>
                </ul>
              </fieldset>
            </li>
          </ul>
        </form>
      </div>
      <div id="SimpleContact_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
        <script type="text/javascript">
    WADFP_SetProgressToForm('SimpleContact_Basic_Default', 'SimpleContact_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
        </script>
        <div id="SimpleContact_Basic_Default_ProgressMessage" >
          <p style="margin:10px; padding:5px;" ><img src="/webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />  Please wait</p>
        </div>
      </div>
      <p class="maintext"> </p>
    </div>
    <?php include('includes/footer.php'); ?>
    </div>
    <script type="text/javascript">
    var Full_Name_Spry = new Spry.Widget.ValidationTextField("Full_Name_Spry", "none",{validateOn:["blur"]});
    var Email_Address_Spry = new Spry.Widget.ValidationTextField("Email_Address_Spry", "email",{validateOn:["blur"]});
    var Security_Code_Spry = new Spry.Widget.ValidationTextField("Security_Code_Spry", "none",{validateOn:["blur"]});
    var Security_Answer_Spry = new Spry.Widget.ValidationTextField("Security_Answer_Spry", "none",{validateOn:["blur"]});</script>
    </body>
    </html>

    Might want to have a look at this form below. It's similar to yours but no styling - you'd need to use some css to style it up a bit. It's just the raw html/php coding. The form action="form_send.php" - basically save the code to a Dreamweaver document named form_send.php and send the information back to the page to be processed.
    <?php
    $number_1 = rand(1, 9);
    $number_2 = rand(1, 9);
    $answer = md5($number_1+$number_2);
    if(isset($_POST['submit'])) {
    // get the name from the form 'name' field
    $name = trim($_POST['name']);
    if (empty($name)) {
    $error['name'] = "<span>Please provide your name</span>";
    // get the email from the form 'email' field
    $email = trim($_POST['email']);
    if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
    $error['email'] = "<span>Please provide a valid email address</span>";
    // get the comments from the form 'comments' field 
    $comments = trim($_POST['comments']);   
    if (empty($comments)) {
    $error['comments'] = "<span>Please provide your comments</span>";
    // security against spam   
    $user_answer = trim(htmlspecialchars($_POST['user_answer']));
    $answer = trim(htmlspecialchars($_POST['answer']));
    if (md5($user_answer) != $answer) {
        $error['answer'] = "<span>Wrong answer - please try again</span>";
    // if no errors send the form   
    if (!isset($error) && md5($user_answer) == $answer) {
    $to = '[email protected]'; // send to recipient
    $from = '[email protected]'; // from your domain
    $subject = 'Response from website';
    $message = "From: $name\r\n\r\n";
    $message .= "Email: $email\r\n\r\n";
    $message .= "Comments: $comments";
    $headers = "From: $from\r\nReply-to: $email";
    $sent = mail($to, $subject, $message, $headers);
    echo 'Your message has been sent.';
    else {
    $number_1 = rand(1, 9);
    $number_2 = rand(1, 9);
    $answer = md5($number_1+$number_2);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Untitled Document</title>
    <style>
    #contactForm span {
        color: #900;
    </style>
    </head>
    <body>
    <form name="contactForm" id="contactForm" method="post" action="form_send.php">
    <p><label for="name">Name<input type="text" name="name" id="name" value="<?php if(isset($name)) {echo $name; } ?>" <?php if(isset($error['name'])) {echo 'style="background-color: #FCC;"'; } ?>></label><br>
    <?php if(isset($error['name'])) {echo $error['name']; } ?></p>
    <p><label for="email">Email<input type="text" name="email" id="email" value="<?php if(isset($email)) {echo $email; } ?>" <?php if(isset($error['email'])) {echo 'style="background-color: #FCC;"'; } ?>></label><br>
    <?php if(isset($error['email'])) {echo $error['email']; } ?></p>
    <p><label for="comments">Comments<textarea name="comments" id="comments" <?php if(isset($error['comments'])) {echo 'style="background-color: #FCC;"'; } ?>>
    <?php if(isset($comments)) { echo $comments; } ?></textarea></label><br>
    <?php if(isset($error['comments'])) {echo $error['comments']; } ?></p>
    <p>Spam prevention - please answer the question below:</p>
    <p><?php echo $number_1; ?> + <?php echo $number_2; ?> = ?<input type="text" name="user_answer" <?php if(isset($error['answer'])) {echo 'style="background-color: #FCC;"'; } ?>/>
    <input type="hidden" name="answer" value="<?php echo $answer; ?>" /><br>
    <?php if(isset($error['answer'])) {echo $error['answer']; } ?></p>
    <p><input type="submit" name="submit" id="sumbit"></p>
    </form>
    </body>
    </html>

  • Functions in a For Loop defining objects from an Array. . .Why Won't This Work?!

    I'm trying to put these functions into a Loop to conserve
    space. Why won't this work?
    .

    Yeah, sly one is right. You can not have the "i" inside the
    onRollOver function, what you have to do is: As the movieClip class
    is dynamic you can create a property of the movieClip which stores
    the value if the "i". And then, inside the onRollOver function, you
    have to make reference to that property.
    for (i=0; i<2; i++) {
    this.regArray
    .iterator = i;
    this.regArray.onRollOver = function () {
    showRegion(regArray[this.iterator]);
    this.regArray
    .onRollOut = function () {
    hideRegion(regArray[this.iterator]);

  • Help...Why won't this compile?

    Why won't this compile?
    Here is my code:
    import java.util.Calendar;
    import javax.swing.JOptionPane;
    public class GetAge{
    public static void main(String[] args){
    int month=Integer.parseInt(JOptionPane.showInputDialog
    (null,"Enter what month(MM) you were born:"));
    int day=Integer.parseInt(JOptionPane.showInputDialog
    (null,"Enter what day(dd) you were born:"));
    int year=Integer.parseInt(JOptionPane.showInputDialog
    (null,"Enter what year(yyyy) you were born:"));
    Calendar rightNow = Calendar.getInstance();
    int year2 = rightNow.get(Calendar.YEAR);
    int day2 = rightNow.get(Calendar.DATE);
    int month2 = rightNow.get(Calendar.MONTH)+1;
    int years = year2-year-1;
    int months = month2-month+12;
    if(day2 >= day)
       int days = day2-day;
    else
       days = day-day2+8;
    JOptionPane.showMessageDialog(null,"You are: " + years
    + " years " + months + " months and " + days + " days old.");
    }

    What you're doing is using days after the if statement; without curly braces only a valid statement is allowed.
    But if you add curly braces, days will be available only in the if block.
    So what you should do is:
    import java.util.Calendar;
    import javax.swing.JOptionPane;
    public class GetAge{
    public static void main(String[] args){
    int month=Integer.parseInt(JOptionPane.showInputDialog
    (null,"Enter what month(MM) you were born:"));
    int day=Integer.parseInt(JOptionPane.showInputDialog
    (null,"Enter what day(dd) you were born:"));
    int year=Integer.parseInt(JOptionPane.showInputDialog
    (null,"Enter what year(yyyy) you were born:"));
    Calendar rightNow = Calendar.getInstance();
    int year2 = rightNow.get(Calendar.YEAR);
    int day2 = rightNow.get(Calendar.DATE);
    int month2 = rightNow.get(Calendar.MONTH)+1;
    int years = year2-year-1;
    int months = month2-month+12;
    int days = 0;      //declare here
    if(day2 >= day)
       days = day2-day;  //...and use here
    else
       days = day-day2+8;   //..and here
    JOptionPane.showMessageDialog(null,"You are: " + years
    + " years " + months + " months and " + days + " days old.");
    }

  • Why won't my "if" expression work?

    This calculation works:
    IF(A3<1,A3*10,IF(A3<5,20))
    Why won't this one:
    if(A4<1,B4==0,if(A4>1<=2,40,if(A4>2<=3,60,if(A4>3<=4,100,if(A4>4<=5,125)))))
    If you want me to send you the table that I am trying to make this work in, just let me know. Thanks,
    Elaine.

    Never mind, I figured it out! Whew.

  • Just downloaded Numbers spreadsheet... I entered a simple "if" statement...If(c2=0,9,7) just to see how it works.... But I get an error message "Argument 1 of if expects a Boolean but found "c2=0....This if statement works fine in Excel

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

  • Why won't my iTunes code work

    Why won't my iTunes code work helpppp

    Hi Benrad09,
    If you are having issues redeeming an iTunes Gift code, you may find the following article helpful:
    Apple Support: If you can't redeem your iTunes Gift Card or code
    http://support.apple.com/kb/HT6021
    Regards,
    - Brenden

  • I purchased the new gen 7 ipod nano and needed to update itunes to 10.7 but my current software says its up to date and won't download 10.6.8 Currently I have 10.5.8 Why won't this update?

    I purchased the new gen 7 ipod nano and needed to update itunes to 10.7 but my current software says its up to date and won't download 10.6.8 Currently I have 10.5.8 Why won't this update?

    The first generation Intel-based Mac's were released in January 2006.
    Snow Leopard requires an Intel processor:
    General requirements
    Mac computer with an Intel processor
    1GB of memory
    5GB of available disk space
    DVD drive for installation
    Some features require a compatible Internet service provider; fees may apply.
    If you go to the Apple menu & "About this Mac" this will tell you what type of processor you have:

  • Why won't this song play even after I authorized the computer? It says that I need to authorize the computer, then I enter my username and password and it says the computer is already authorized. But then the song still won't play. What do I do?

    Why won't this song play even after I authorized the computer? It says that I need to authorize the computer, then I enter my username and password and it says the computer is already authorized. But then the song still won't play. What do I do?

    Use the Apple ID support -> http://www.apple.com/support/appleid/ - click through the contact information and select the iTunes, etc., hot button. You can have Apple call you or email them.
    Clinton

  • Why won't this code work?

    All I want to do is resize the select panel to the same size as east panel. Why won't it work?
    Space.java_____________________________________________
    import javax.sound.sampled.*;
    import java.awt.*;
    import javax.sound.midi.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import java.io.*;
    public class Space extends JFrame implements ActionListener, Runnable{
         //Sound
         Sequence currentSound;
         Sequencer player;
         Thread soundCheck;
         boolean check = true;
         public void start(){
              soundCheck = new Thread();
              soundCheck.start();
         public void run(){
              try{
                   File bgsound = new File("Sounds" + File.separator + "Space.mid");
                   currentSound = MidiSystem.getSequence(bgsound);
                   player = MidiSystem.getSequencer();
                   player.open();
                   player.setSequence(currentSound);
                   player.start();
                   checkSound();
              } catch (Exception exc){}
         public void checkSound(){
              while(check){
                   if(!player.isRunning()){
                     run();
                   try{
                        soundCheck.sleep((player.getMicrosecondLength() / 1000)-player.getMicrosecondPosition()); // sleep for the length of the track
                   }catch (InterruptedException IE){}
         //Screen Variables:
         Dimension SCREEN = Toolkit.getDefaultToolkit().getScreenSize();
         final int SCREENWIDTH = SCREEN.width;
         final int SCREENHEIGHT = SCREEN.height;
         //Panels:
         JPanel select, main, north, south, east;
        //Buttons:
         JButton instructB, cheatB, playB, exit, about;
         //Labels:
         JLabel open, cheat1, cheat2, cheatInstruct, i1, i2 , i3, aboutLabel;
         //The container and frame:
         static Space jframe;
         Container content;
         //The Constructor:
         public Space(){
              super("Space");
              //set  container attributes:
              content = getContentPane();
              content.setLayout(new BorderLayout());
              //init panels:
              main   = new JPanel();
              select = new JPanel();
              north  = new JPanel();
              east   = new JPanel();
              south  = new JPanel();
              //set panel attributes:
              select.setLayout(new GridLayout(3,0,10,10));     
              select.setBackground(Color.black);
              main.setBackground(Color.black);
              north.setBackground(Color.black);
              //add panels:
              content.add("West", select);
              content.add("Center", main);
              content.add("North", north);
              content.add("East", east);
              //Image Icons:
              Icon exit1 = new ImageIcon("Images" + File.separator + "exit1.gif");
              Icon exit2 = new ImageIcon("Images" + File.separator + "exit2.gif");
              Icon about1 = new ImageIcon("Images" + File.separator + "about1.gif");
              Icon about2 = new ImageIcon("Images" + File.separator + "about2.gif");
              //init buttons, add their listeners, and set their attributes:
              instructB = new JButton("Instructions", new ImageIcon("Images" + File.separator + "ship.gif"));
              instructB.setContentAreaFilled(false);
              instructB.setForeground(Color.yellow);
              instructB.addActionListener(this);
              select.add(instructB);
              cheatB = new JButton("Cheats", new ImageIcon("Images" + File.separator + "cheat.gif"));
              cheatB.setContentAreaFilled(false);
              cheatB.setForeground(Color.yellow);
              cheatB.addActionListener(this);
              select.add(cheatB);
              playB = new JButton("Play", new ImageIcon("Images" + File.separator + "ship2.gif"));
              playB.setContentAreaFilled(false);
              playB.setForeground(Color.yellow);
              playB.addActionListener(this);
              select.add(playB);          
              exit = new JButton();
              exit.setRolloverEnabled(true);
              exit.setIcon(exit1);
              exit.setRolloverIcon(exit2);
              exit.setBorderPainted(false);
              exit.setContentAreaFilled(false);
              exit.addActionListener(this);
              north.add(exit);
              about = new JButton();
              about.setRolloverEnabled(true);
              about.setIcon(about1);
              about.setRolloverIcon(about2);
              about.setBorderPainted(false);
              about.setContentAreaFilled(false);
              about.addActionListener(this);
             north.add(about);
             //Labels:
             open = new JLabel("", new ImageIcon("Images" + File.separator + "open.gif"), JLabel.CENTER);
              main.add(open);
              cheat1 = new JLabel("<html><h1>tport</h1></html>");
              cheat1.setForeground(Color.red);
              cheat2 = new JLabel("<html><h1>zap</h1></html>");
              cheat2.setForeground(Color.green);
              cheatInstruct = new JLabel("<html><h1>Type a cheat at any time during a game, and press the \"Enter\" key.</html></h1>");
              cheatInstruct.setForeground(Color.blue);     
              i1 = new JLabel("<html><h1>The arrow keys move your ship.</h1></html>");
              i1.setForeground(Color.red);
              i2 = new JLabel("<html><h1>The space-bar fires the gun.</h1></html>");
              i2.setForeground(Color.green);
              i3 = new JLabel("<html><h1>The red circles give upgrades.</html></h1>");
              i3.setForeground(Color.blue);
              aboutLabel    = new JLabel("", new ImageIcon("Images" + File.separator + "aboutImage.gif"), JLabel.CENTER);
              //centerPanel();     
         private void centerPanel(final int width, final int height){
              try{
                   Runnable setPanelSize = new Runnable(){
                        public void run(){
                             east.setPreferredSize(new Dimension(width, height));                    
                   SwingUtilities.invokeAndWait(setPanelSize);
              } catch (Exception e){}
         public void actionPerformed(ActionEvent e){
              //if the play button was pressed do:
              if(e.getSource() == playB){
                  //do something
             //else if the cheat button was pressed do:
              else if(e.getSource() == cheatB){
                   //remove and add components
                   main.removeAll();
                   main.setLayout(new GridLayout(3,0,0,0));
                   main.add(cheat1);
                   main.add(cheat2);
                   main.add(cheatInstruct);
                   main.repaint();
                   main.validate();          
              else if(e.getSource() == instructB){
                   //remove and add components
                   main.removeAll();
                   main.setLayout(new GridLayout(3,0,0,0));
                   main.add(i1);
                   main.add(i2);
                   main.add(i3);
                   main.repaint();
                   main.validate();          
              else if(e.getSource() == exit){
                   jframe.setVisible(false);
                   showCredits();          
              else if(e.getSource() == about){
                   main.removeAll();
                   main.setLayout(new FlowLayout());
                   main.add(aboutLabel);                         
                   main.repaint();
                   main.validate();
         public void showCredits(){
              try{
                   String[] args = {};
                   Credits.main(args);
              }catch (Exception e){}
         public static void main(String args[]){
              jframe = new Space();
              jframe.setUndecorated(true);
              jframe.setBounds(0, 0, jframe.SCREENWIDTH, jframe.SCREENHEIGHT);
              jframe.setVisible(true);
            jframe.show();     
            jframe.setResizable(false);
               jframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
             jframe.centerPanel(jframe.select.getWidth(), jframe.select.getHeight());
             jframe.run(); //start music

    The reason it wasn't working was because you were calling the method after you had set the frame visible, so you saw no change. On top of that, jframe.select.getWidth() only works after the frame is visible in this case. So it's best to set a fixed size for one of them, then use getWidth, or as I did... it's the same thing. I also changed the centerPanel method, I'm not sure if all that's exactly needed, but you can change it back if you think you'll need it.
    import javax.sound.sampled.*;
    import java.awt.*;
    import javax.sound.midi.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import java.io.*;
    public class Space extends JFrame implements ActionListener, Runnable{
    //Sound
    Sequence currentSound;
    Sequencer player;
    Thread soundCheck;
    boolean check = true;
    public void start(){
    soundCheck = new Thread();
    soundCheck.start();
    public void run(){
    try{
    File bgsound = new File("Sounds" + File.separator + "Space.mid");
    currentSound = MidiSystem.getSequence(bgsound);
    player = MidiSystem.getSequencer();
    player.open();
    player.setSequence(currentSound);
    player.start();
    checkSound();
    } catch (Exception exc){}
    public void checkSound(){
    while(check){
    if(!player.isRunning()){
                run();
    try{
    soundCheck.sleep((player.getMicrosecondLength() / 1000)-player.getMicrosecondPosition()); // sleep for the length of the track
    }catch (InterruptedException IE){}
    //Screen Variables:
    Dimension SCREEN = Toolkit.getDefaultToolkit().getScreenSize();
    final int SCREENWIDTH = SCREEN.width;
    final int SCREENHEIGHT = SCREEN.height;
    //Panels:
    JPanel select, main, north, south, east;
        //Buttons:
    JButton instructB, cheatB, playB, exit, about;
    //Labels:
    JLabel open, cheat1, cheat2, cheatInstruct, i1, i2 , i3, aboutLabel;
    //The container and frame:
    static Space jframe;
    Container content;
    //The Constructor:
    public Space(){
    super("Space");
    //set  container attributes:
    content = getContentPane();
    content.setLayout(new BorderLayout());
    //init panels:
    main   = new JPanel();
    select = new JPanel();
    north  = new JPanel();
    east   = new JPanel();
    south  = new JPanel();
    //set panel attributes:
    select.setLayout(new GridLayout(3,0,10,10));
    select.setBackground(Color.black);
    main.setBackground(Color.black);
    north.setBackground(Color.black);
    //add panels:
    content.add("West", select);
    content.add("Center", main);
    content.add("North", north);
    content.add("East", east);
    //Image Icons:
    Icon exit1 = new ImageIcon("Images" + File.separator + "exit1.gif");
    Icon exit2 = new ImageIcon("Images" + File.separator + "exit2.gif");
    Icon about1 = new ImageIcon("Images" + File.separator + "about1.gif");
    Icon about2 = new ImageIcon("Images" + File.separator + "about2.gif");
    //init buttons, add their listeners, and set their attributes:
    instructB = new JButton("Instructions", new ImageIcon("Images" + File.separator + "ship.gif"));
    instructB.setContentAreaFilled(false);
    instructB.setForeground(Color.yellow);
    instructB.addActionListener(this);
    select.add(instructB);
    cheatB = new JButton("Cheats", new ImageIcon("Images" + File.separator + "cheat.gif"));
    cheatB.setContentAreaFilled(false);
    cheatB.setForeground(Color.yellow);
    cheatB.addActionListener(this);
    select.add(cheatB);
    playB = new JButton("Play", new ImageIcon("Images" + File.separator + "ship2.gif"));
    playB.setContentAreaFilled(false);
    playB.setForeground(Color.yellow);
    playB.addActionListener(this);
    select.add(playB);
    exit = new JButton();
    exit.setRolloverEnabled(true);
    exit.setIcon(exit1);
    exit.setRolloverIcon(exit2);
    exit.setBorderPainted(false);
    exit.setContentAreaFilled(false);
    exit.addActionListener(this);
    north.add(exit);
    about = new JButton();
    about.setRolloverEnabled(true);
    about.setIcon(about1);
    about.setRolloverIcon(about2);
    about.setBorderPainted(false);
    about.setContentAreaFilled(false);
    about.addActionListener(this);
        north.add(about);
        //Labels:
        open = new JLabel("", new ImageIcon("Images" + File.separator + "open.gif"), JLabel.CENTER);
    main.add(open);
    cheat1 = new JLabel("<html><h1>tport</h1></html>");
    cheat1.setForeground(Color.red);
    cheat2 = new JLabel("<html><h1>zap</h1></html>");
    cheat2.setForeground(Color.green);
    cheatInstruct = new JLabel("<html><h1>Type a cheat at any time during a game, and press the \"Enter\" key.</html></h1>");
    cheatInstruct.setForeground(Color.blue);
    i1 = new JLabel("<html><h1>The arrow keys move your ship.</h1></html>");
    i1.setForeground(Color.red);
    i2 = new JLabel("<html><h1>The space-bar fires the gun.</h1></html>");
    i2.setForeground(Color.green);
    i3 = new JLabel("<html><h1>The red circles give upgrades.</html></h1>");
    i3.setForeground(Color.blue);
    aboutLabel    = new JLabel("", new ImageIcon("Images" + File.separator + "aboutImage.gif"), JLabel.CENTER);
    east.setPreferredSize(new Dimension(125, SCREEN.width));
    //centerPanel();
    /*private void centerPanel(final int width, final int height){
    try{
    Runnable setPanelSize = new Runnable(){
    public void run(){
    east.setPreferredSize(new Dimension(width, height));
    SwingUtilities.invokeAndWait(setPanelSize);
    } catch (Exception e){}
    private void centerPanel(final int width, final int height)
         east.setPreferredSize(new Dimension(width, height));
    public void actionPerformed(ActionEvent e){
    //if the play button was pressed do:
    if(e.getSource() == playB){
        //do something
        //else if the cheat button was pressed do:
    else if(e.getSource() == cheatB){
    //remove and add components
    main.removeAll();
    main.setLayout(new GridLayout(3,0,0,0));
    main.add(cheat1);
    main.add(cheat2);
    main.add(cheatInstruct);
    main.repaint();
    main.validate();
    else if(e.getSource() == instructB){
    //remove and add components
    main.removeAll();
    main.setLayout(new GridLayout(3,0,0,0));
    main.add(i1);
    main.add(i2);
    main.add(i3);
    main.repaint();
    main.validate();
    else if(e.getSource() == exit){
    jframe.setVisible(false);
    //showCredits();
    else if(e.getSource() == about){
    main.removeAll();
    main.setLayout(new FlowLayout());
    main.add(aboutLabel);
    main.repaint();
    main.validate();
    /*public void showCredits(){
    try{
    String[] args = {};
    Credits.main(args);
    }catch (Exception e){}
    public static void main(String args[]){
    jframe = new Space();
    //jframe.centerPanel(500, jframe.select.getHeight());
    jframe.setUndecorated(true);
    jframe.setBounds(0, 0, jframe.SCREENWIDTH, jframe.SCREENHEIGHT);
    jframe.setVisible(true);
            jframe.show();
            jframe.setResizable(false);
          jframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
        //jframe.centerPanel(jframe.select.getWidth(), jframe.select.getHeight());
        jframe.run(); //start music
    }Sorry I lost all the indenting :) I guess you can take a look at the few lines I changed and copy those lines.

  • Consolidate Library - why won't this work?

    Hi there,
    I've been using iTunes and my iPod on several iMacs successfully for years - I've just changed to a PC and now I feel like a beginner!
    I can't seem to get iTunes for Windows to seek out all my MP3s and put them in iTunes. The only way I can get iTunes to put them in it's library is to play them - then iTunes recognises then and remebers them. I have tried clicking on consolidate library - nothing. I have tried downloading my new music directly into the iTunes music folder - nothing. I can maunally add the file I download music into, but I don't want to have to do that all the time.
    Why won't iTunes just find my music for me? It does on my iMac!

    I dont know!
    In what way is it not working?

  • FORALL MERGE statement works in local database but not over database link

    Given "list", a collection of NUMBER's, the following FORALL ... MERGE statement should copy the appropriate data if the record specified by the list exists on both databases.
    forall i in 1..list.count
    merge into tbl@remote t
    using (select * from tbl
    where id = list(i)) s
    on (s.id = t.id)
    when matched then
    update set
    t.status = s.status
    when not matched then
    insert (id, status)
    values (s.id, s.status);
    But this does not work. No exceptions, but target table's record is unchanged and "sql%rowcount" is 0.
    If the target table is in the local database, the exact same statement works:
    forall i in 1..list.count
    merge into tbl2 t
    using (select * from tbl
    where id = list(i)) s
    on (s.id = t.id)
    when matched then
    update set
    t.status = s.status
    when not matched then
    insert (id, status)
    values (s.id, s.status);
    Does anyone have a clue why this may be a problem?
    Both databases are on Oracle 10g.
    Edited by: user652538 on 2009. 6. 12 오전 11:29
    Edited by: user652538 on 2009. 6. 12 오전 11:31
    Edited by: user652538 on 2009. 6. 12 오전 11:45

    Should throw an error in my opinion. The underlying reason for not working is basically because of
    SQL> merge into   t@remote t1
         using   (    select   sys.odcinumberlist (1) from dual) t2
            on   (1 = 1)
    when matched
    then
       update set i = 1
    Error at line 4
    ORA-22804: remote operations not permitted on object tables or user-defined type columnsSame reason as e.g.
    insert into t@remote select * from table(sys.odcinumberlist(1,2,3))doesn't work.

Maybe you are looking for

  • Downloading CD going to wrong Album

    I have been downloading/Importing my CD's onto my computer, and for some reason a couple of the CD's are putting the songs in an album that already exists. For example I was importing Queen album and it was going into the Dan Seals album. Tried it ag

  • [SOLVED]Cannot mount partitions with PCMANFM --no longer an issue

    Hi, I have searched and searched and pulling my hair out on this issue. I am using PCMANFM .9.10 on an LXDE install using the Arch x86 iso.  My HD contains several linux partitions and a FAT32 partition. I am not able to mount these partitions in PCM

  • Cisco 6880-x vsl link failure

    Hi Guys, I have a head scratcher that I'm dealing with.  I have 2x (2 month) 6880-x switches configured with vss with 2 vsl links on each of its sup cards and switch 1 is the active switch on the vss.  Both 6880x chassis also have 2 additional 10g mo

  • No records when inputting new field from linked tables.

    I have linked two tables in a report.  If I use only fields from one table, no problem.  As soon as I add a field from the other table no records are pulled.  I am using the same filed "IncidentID" in both tables as a link.  If I attempt to pull the

  • Variance in Activity

    I am currently working on an implementation project in a complex make to order scenario in which I am using valuated sales order stock. For product costing perspective, I have created thee activity types FOH, Material and labour for product costing a