Condition statment

Hello Forum members
I need some tips , I ahve a sql statment , is it is posible i can put select statment in where clause
=============================================================
SELECT key_account, dno, name,street, city, state, zip_code, ountry_code,
FROM key_account
where ( select 'dno = ' || dno from key_account)
==============================================================
The select statment in where clause i need to build dynamically and pass to as a where condition
Rds

not exacly sure what you are after but something like this?
/* Formatted on 11/12/2010 10:38:20 AM (QP5 v5.149.1003.31008) */
CREATE OR REPLACE TYPE key_account_type AS OBJECT
                  (key_account INTEGER,
                   dno INTEGER,
                   account_id INTEGER,
                   name VARCHAR2 (200),
                   street INTEGER,
                   city VARCHAR2 (200),
                   zip_code VARCHAR2 (200),
                   ctry_cd VARCHAR2 (200));
CREATE OR REPLACE TYPE key_account_array AS TABLE OF key_account_type;
FUNCTION get_key_account (pdno       IN key_account.dno%TYPE,
                          pname      IN key_account.name%TYPE,
                          pcountry   IN key_account.country%TYPE)
   RETURN key_account_array
   PIPELINED
IS
BEGIN
   FOR EACH IN (SELECT key_account,
                       dno,
                       name,
                       street,
                       city,
                       state,
                       zip_code,
                       country_code
                  FROM key_account
                 WHERE dno = pdno OR name = pname OR country = pcountry)
   LOOP
      PIPE ROW (key_account_type (EACH.key_account,
                                  EACH.dno,
                                  EACH.name,
                                  EACH.street,
                                  EACH.city,
                                  EACH.zip_code,
                                  EACH.country_cd));
   END LOOP;
   RETURN;
END;
select t1.*  from TABLE (get_key_account ( (1,'A','USA')) t, key_account t1
where t.whatever = t1.whateverEdited by: pollywog on Nov 12, 2010 10:42 AM
Edited by: pollywog on Nov 12, 2010 10:43 AM

Similar Messages

  • Conditional statments in tables

    Hi ,
    Can anyone help me with a problem relating to dynamic tables and conditional statements.
    I have a dynamic table where the user can add and delete rows as required – which appends the array value in square brackets to the duplicated row.
    Within a row I want to display a cash value in say  the 3rd column dependent on the value previously selected from a drop down in 2nd column.
    I’m struggling to understand the simplest way of referring to the rows previous column in a conditional statement.
    Any help would be appreciated.
    Dog.

    Hi Dog,
    There are a couple of ways to do it, probably easiest is to take advantage of the fact that the 2 fields are in the same row and therefore share a parent. You could put this script in the ready:layout event of the target field.
         // Refer to data in previous column
         if (this.parent.DropDownField != null) {
              this.rawValue = this.parent.DropDownField.rawValue;
    Where:
    this = the target field (i.e. the field where you want the value displayed)
    this.parent = the current row of the table
    DropDownField = is the field in the previous column, replace this with the name of your field

  • Eclipse question: generated comments for conditional statments?

    out of habit, i always mark the end of my conditionals, for example:
    while (something) {
    } //end while
    if(something){
    }//end if
    else{
    }//end elseis is possible to designate comments to be appended to the automatically generated brackets in eclipse for
    certain conditionals?

    yawmark, you are the java GURU ( i know everyone hates
    that word, but it fits). Thanks. I looked everywhere
    under preferences but i never saw that screen until
    you just mentioned it.Well all marvel at yawmark we do!
    >
    tsith,
    i know many people hate those comments, but it helps
    me keep things straight, plus i comment extensively
    so when i need to go back and change a program i can
    figure out what's going on easily. it really works!Hey - if it works for you, then go for it. I guess for me my loop/conditional/method blocks are relatively short, and I'm consistent with my indentation, and my editor will let me know what braces are matching, and it supports folding - so marking the ends of those things doesn't really make sense.
    now
    tell the true tsith, you aren't the kind of person
    that programs an entire program on one line with 0
    comments,
    right? say it isn't so! =)Most of my co-workers think I'm pretty verbose wrt comments. I tend to comment intent pretty heavily, but I don't comment individual lines of code.
    Sometimes I use comments as a way to exercise my creative nature and break up the unrelenting monotony of the day - but then - sometimes I use the fora for that purpose as well!
    good luck
    Lee
    // end post

  • Problem in SAP-Script Conditional Block

    Hi All,
    I am creating one report form using SAP Script, which uses standard driver program. There is a control statement like,
    { Consider W=1, X=0 , Y=0 & Z=0 }
    /: IF ((X==0 AND Y==0) OR (Z==0 OR W==0)  OR ...) { lot of OR & AND stament used in this conditional statment }
    /: ELSE
    /: ENDIF
    Here is a mistery, it executes both if and else statement. Please give me some idea on this, and why such a weird output is displaying?
    <<removed by moderator>>
    Edited by: kishan P on Sep 13, 2010 4:17 PM

    Hi..
    The syntax of the command could be incorrect. Check for full stops, variables etc.
    http://help.sap.com/saphelp_40b/helpdata/en/d1/80325f454211d189710000e8322d00/content.htm
    Please check the above link's last paragraph which says :
    "If a syntax error occurs in the interpretation of this command, then the command is not executed. This may have an unexpected effect on the subsequent text output. For example, if the IF statement is incorrect, then all following ELSEIF and ELSE commands will be ignored, since the opening IF command is u2018missingu2019. This will cause all the text lines attached to the ELSEIF and ELSE commands to be printed."
    Regards,
    Karthik

  • When i add some conditions the recordset disappeared from te list !!!!!!

    hi
    i make a recordset and at the select statment i write a
    conditional statment to select and when i go to make dynamic table
    to view at te same page i found that the recordset disappeared due
    to my code addtions
    how i can solve that ?
    thanks in advance.

    One of the extensions may not be working properly.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    If it does work in Firefox Safe-mode then disable all extensions (Tools > Add-ons > Extensions) and then try to find which is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Aaaargh! IE + Spry Menu = My Personal Hell! Help?!

    Okay, so I've searched through these forums trying to find a solution to my problem, and while I did find over 200 posts related to my issue, I couldn't find a solution...
    ...maybe someone can help?
    I've got a simple vertical spry menu that always works in Safari (Mac and PC), Chrome, Firefox (Mac and PC) and Opera. Naturally I'm having problems with Explorer (7 and 8). I've cleared out the cache/browsing history/temporary files countless times, hoping that the problem will clear up once I re-upload my CSS and HTML files, but to no avail.
    The page in question is here: http://www.electronicgraphicsgroup.com/page.html
    The problem I'm having is that spaces appear between the menu buttons (exposing a tell-tale yellow background) and the second- and third tier buttons are not visible. What's even stranger is that this menu will actually work - SOMETIMES. Then it craps out on me. I've reloaded all of the files related to this site several times (I'm in the process of a major redesign), and since 100% of my company's staff uses IE I simply have to get this to work 100% of the time. Not using a spry menu is not an option, nor is screaming my head off in an obscenity-soaked tirade as I run all over the office in a fit of anger...
    I've run this page through http://jigsaw.w3.org/css-validator/ and only received warnings about my iFrame, which does not affect this page. I wish it HAD found problems - something to point me in the right direction!
    I'm using DW CS3 with Spry 1.6.1.
    Can anyone help out? Anyone?

    IE uses different basic settings for margins, padding, etc. in fact no two browser are exactly the same, this is why so many css 'hack's' are around, and also why if your styles overwrite any other css styles in a css script, 'odd' behavior can occur.
    One solution is to always start yor css with a css reset, and whenever you attach a css file or change your css you should always review it.
    for info on css reset see: http://meyerweb.com/eric/tools/css/reset/
    Another solution is to use IE conditional statments to change the css to IE specific settings
    Format for IE conditional statment is:
    <!--[if IE]>
    <style type="text/css">
    enter your revised style here
    </style>
    <![endif]-->
    HTH
    PZ

  • Wildcards in 3rd party script

    I am trying to adapt a 3rd party calendar script for
    operation on my PHP
    site. I'm guessing that the script was writted for use with
    Access or
    something besides MySQL since it uses "*" as a wildcard in
    the SQL (which I
    can fix). But it also uses that wildcard in the body, e.g.,
    if (($val['day'] == $cellValue) && (($val['month']
    == $this->month) ||
    ($val['month'] == '*')) && (($val['year'] ==
    $this->year) || ($val['year']
    == '*'))) {
    How do I patch that - or do I even need to?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================

    Oh - I see. I thought it was a rather strange usage myself!
    Hmmm....
    OK - I'm going to have to look harder to see why I'm getting
    an error here -
    http://development.bayleys.com/test-calendar.php
    The referenced line is contained in this block -
    <?php
    class CreateQCalendarArray {
    var $daysInMonth;
    var $weeksInMonth;
    var $firstDay;
    var $week;
    var $month;
    var $year;
    var $counter;
    function CreateQCalendarArray($month, $year) {
    $this->month = $month;
    $this->year = $year;
    $this->week = array();
    $this->daysInMonth =
    date("t",mktime(0,0,0,$month,1,$year));
    // get first day of the month
    $this->firstDay = date("w",
    mktime(0,0,0,$month,1,$year));
    $tempDays = $this->firstDay + $this->daysInMonth;
    $this->weeksInMonth = ceil($tempDays/7);
    $this->fillArray();
    function fillArray() {
    // create a 2-d array
    for($j=0;$j<$this->weeksInMonth;$j++) {
    for($i=0;$i<7;$i++) {
    $counter++;
    $this->week[$j][$i] = $counter;
    // offset the days
    $this->week[$j][$i] -= $this->firstDay;
    if (($this->week[$j][$i] < 1) ||
    ($this->week[$j][$i] >
    $this->daysInMonth)) {
    $this->week[$j][$i] = "";
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "David Powers" <[email protected]> wrote in message
    news:[email protected]...
    > Murray *ACE* wrote:
    >> So, the "*" syntax is correct in PHP?
    >
    > No. I'm just commenting that the conditional statment is
    rather
    > meaningless. If * means anything, the condition boils
    down to this in
    > plain language:
    >
    > If the day is the same as the submitted value AND the
    month is either this
    > month or any other month AND the year is this year or
    any other year.
    >
    > If any month and any year are acceptable, all that's
    being checked is
    > whether the day is the same as $cellValue.
    >
    > --
    > David Powers, Adobe Community Expert
    > Author, "The Essential Guide to Dreamweaver CS3"
    (friends of ED)
    > Author, "PHP Solutions" (friends of ED)
    >
    http://foundationphp.com/

  • How do you get to display checkbox items  in list or detail layouts?

    Hi,
    I have searched everyhwere for what I felt would be standard stuff in web apps, now lost a day to it!
    None of the online videos/knowledge base articles or this forum seem to cover it but I can't believe you wouldn't be able to do it.
    If I have created checkbox fields in my web apps how do I get them to display in the main templates (details and list) as list items, ul, ol or dl or anything else other than raw output?
    How do I wrap the nessersary html around the values? Jquery for now I guess or is there some hidden liquid layout or tag parameter/value I don't know of?
    And whilst I'm on it is my only option to not show or show content based on a boolean true/false value to do it through jquery/css?
    Help appreciated, so desperate now!
    Regards
    Bangers

    Hi Mary,
    Thanks for the help. I saw that somewhere though Adobe's making this forum nice and tricky to find anything! Relied on google caching for most useful stuff I've found to bybass the redirect to the first forum page.
    I needed it to wrap around the items so came up with this:
    <script type="text/javascript">
         $(document).ready(function () {
         // Populate a dl with checkbox items or choose any other html to wrap around items
             var checkItems="{tag_checkboxItems}";
             $('#dlID').html('<dt>Items List Title</dt><dd>'+checkItems.split(",").join("</dd><dd>")+'</dd>');
              // #dlID can be anything but identifys the html element that you setup to contain your list of items in my case it was a dl with id #dlID
    </script>
    If there is a better SEO method to do this please let me know.
    Frankly I've been  amazed that web apps don't really support conditional statments and there is little to no information on achieving it through jquery (my first projects have been fairly basic)...roll on fluild layouts I guess.
    Failing that maybe Adobe could produce something in the knowledge base or videos which really do cover more advanced implementaion of web apps. I doubt anyone using web apps or having had experience of other CMS would really consider showing or hiding content based on boolean results or looping to create lists all that advanced, it's more a fundemental function of a CMS.
    P.S Thanks again to both of you.
    Bangers x

  • Help with an advance mysql query

    I'm using CF 7 to query a MySQL 5 DB.
    I was wondering if it's possible to add an OR operator in a
    subquery or at the end of a conditional statment. Let's say that in
    my conditional WHERE statement after a few inclusive conditions, I
    wanted to add an "AND & OR" logic.
    maybe by including part of my code I can be a little more
    clear:
    <cfquery name="domysearch" ...>
    SELECT
    a.id as id,
    b.company as company,
    c.add_line1 as add_line1,
    FROM registratn_contacts a, registratn b,
    registratn_addresses c
    WHERE a.owner = #arguments.owner#
    AND b.id = a.master_record
    AND c.id = a.address_id
    AND c.state = 'NY'
    OR c.state = 'CA'
    I would like to know if I can or should accomplish this in my
    query or if I should have this logic outside the query?
    Thanks for any help!!!!
    Carlos

    WHERE .....
    AND (c.state = 'NY' OR c.state = 'CA')
    You can use an OR, but it is probably
    better to use an IN clause, as it is essentially an OR, and
    would be more efficient.
    AND c.state IN ( 'NY', 'CA')
    Phil

  • Css upload problem

    I've just installed CS3 Design Premium and made changes to a
    css file and uploaded it to the remote host using the put button.
    The page did not find the stylesheet and displayed all over the
    place. I then went to another pc and uploaded the same file to the
    same place using Dreamweaver 8 and the page found the css and
    displayed correctly. I then tried it on a different site with the
    same result - CS3 went missing while the same file uploaded with
    DW8 had no problems. View source on both pages showed the correct
    link to the stylesheet.
    I'm a bit confused - has any body had a similar experience or
    know what's causing this?

    IE uses different basic settings for margins, padding, etc. in fact no two browser are exactly the same, this is why so many css 'hack's' are around, and also why if your styles overwrite any other css styles in a css script, 'odd' behavior can occur.
    One solution is to always start yor css with a css reset, and whenever you attach a css file or change your css you should always review it.
    for info on css reset see: http://meyerweb.com/eric/tools/css/reset/
    Another solution is to use IE conditional statments to change the css to IE specific settings
    Format for IE conditional statment is:
    <!--[if IE]>
    <style type="text/css">
    enter your revised style here
    </style>
    <![endif]-->
    HTH
    PZ

  • Help - index page has disappeared after removing code that was recommended regarding Flash

    After inserting some conditional comments regarding earlier versions of IE not displaying bulleted lists properly. I received a message about Javascript code that should be removed regarding my Flash element.
    When I removed the code that was indicated, my index page changed to a gray screen that had some copy about needing to update the Flash player, so I thought I'd totally take out the code relating to the Flash element and I would reinsert the Flash movie. However when I preview it everything is gone except a gray background. In Live View the original page is there. When I try to look at in in design view preview or view it in a IE browser it is just a gray background.
    I'm attaching the code for the page to see if I accidently removed some element that needed to be in to display the page. Please advise ASAP. Thank you.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Total Care Nursing Services</title>
    <link href="css/twoColFixRtHdr.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 190px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 10px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <!--[if lte IE 7]>
    <style>
    .twoColFixRtHdr #container #sidebar1 ul {
    margin-left: 25px
    </style>
    <! [endif]-->
    <style type="text/css">
    <!--
    body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    body {
    background-color: #242D80;
    margin-right: 0px;
    a:link {
    color: #DC3505;
    text-decoration: none;
    a:visited {
    text-decoration: none;
    color: #4A6FBB;
    a:hover {
    text-decoration: none;
    color: #038F0E;
    a:active {
    text-decoration: none;
    h1,h2,h3,h4,h5,h6 {
    font-family: Palatino Linotype, Book Antiqua, Palatino, serif;
    font-weight: bold;
    -->
    </style>
    <link href="css/global.css" rel="stylesheet" type="text/css" /><style type="text/css">
    <!--
    a {
    font-weight: bold;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="twoColFixRtHdr">
    <a href="tcns_members.html"></a>
    <div id="container">
      <div class="twoColFixRtHdr" id="header">
    <!-- end #header -->
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a href="index.html">Home</a>    </li>
      <li><a href="about_us.html">About Us</a></li>
      <li><a href="staffing.html">Staffing Services</a>    </li>
      <li><a href="join_us.html">Join Us</a></li>
      <li><a href="contact_us.html">Contact Us</a></li>
      <li><a href="nursing_news.html">Nursing News</a></li>
      <li><a href="tcns_members.html">TCNS Members</a></li>
    </ul>
      </div>
      <div class="twoColFixRtHdr" id="sidebar1">
        <h3 class="sidebarTitle"><span class="sidebarTitle">TCNS MEDICAL PROFESSIONALS</span></h3>
        <ul>
          <li class="spacedList">Registered Nurses</li>
          <li class="spacedList">Licensed Practical Nurses</li>
          <li class="spacedList">Certified Nursing Assistants</li>
          <li class="spacedList">Radiological Technicians</li>
          <li class="spacedList">Physical Therapists</li>
          <li class="spacedList">Respiratory Therapists</li>
          <li class="spacedList">Home Health Assistants</li>
        </ul>
    <p class="sidebarCopy">Interested in a career at TCNS? <a href="contact_us.html">Contact us</a> to learn more today!</p>
        <p class="sidebarCopy">Are you a facility looking for health care staffing in South Florida? <a href="staffing.html">Click here</a>.</p>
      </div>
      <div id="mainContent">
        <h1>
      Offering Compassionate Care with a Committment to Excellence</h1>
        <p><span class="company">
        </span><span class="company">TOTAL CARE NURSING SERVICES</span> was founded as a bridge  between health care professionals and the many institutions in the health-care  industry, with the primary objective of promoting the patient’s well being and  satisfaction.</p>
    <p>With a nationwide nurse shortage approaching 800,000 and  projected to worsen as the baby boomer generation enters retirement age, the  need for skilled nurses and other health care professionals is rapidly  increasing. However, the greater challenge for health care facilities is to  recruit and retain motivated, dedicated professionals who will help deliver the  quality care that is demanded of them by every aspect of the industry. <span class="company">TOTAL  CARE NURSING SERVICES</span> has the vision to answer this challenge and provide the  needed personnel to its clients at reasonable cost.
      <!-- end #mainContent -->
    </p>
      </div>
    <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />
      <div id="footer">
        <p><span class="spaceFooter"><a href="index.html">Home</a></span>l <span class="spaceFooter"><a href="mailto:[email protected]">E-Mail</a></span>l <span class="spaceFooter"><a href="links.html">Links</a></span>l <span class="spaceFooter"><a href="search.html">Search</a></span><br />
          Copyright 2009 - Total Care Nursing Services, LLC
    <!-- end #footer -->
        </p>
    </div>
    <!-- end #container -->
    </div>
    </body>
    </html>

    2.
    Deleting and getting the file should solve this problem.
    3.
    You should only require 2 IE conditional statement (for css code), one for less than IE 8 and one for less than IE 7.
    Both or just one of these should be inside the <head> </head> tags not anywhere else.
    The conditional statment in flash are for <object> code.
    Here is an example of how the flash code should look for your webpage:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="250" height="204" id="FlashID" title="name of your swf file here without .swf">
            <param name="movie" value="link to your swf file here" />
            <param name="quality" value="high" />
            <param name="wmode" value="opaque" />
            <param name="swfversion" value="8.0.35.0" />
            <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
            <param name="expressinstall" value="../Scripts/expressInstall.swf" />
            <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="link to your swf file here" width="250" height="204">
              <!--<![endif]-->
              <param name="quality" value="high" />
              <param name="wmode" value="opaque" />
              <param name="swfversion" value="8.0.35.0" />
              <param name="expressinstall" value="../Scripts/expressInstall.swf" />
              <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
              <div>
                <h4>Content on this page requires a newer version of Adobe Flash
                  Player.</h4>
                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
              </div>
              <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
          </object>
    The width and height values to be changed to what you require.
    NO other code is required.
    PZ

  • Apply a content filter to a group of sender addresses

    I want to setup a content filter that does a certain action but I want the condition to be if the message came from an email address in a list of source addresses.  I seem to only be able to apply one.  I really dont want to have to create 200 condition statments just to match someone in a list or addresses.  Cant use an LDAP becuase these are incoming addresses so they dont appear in my LDAP
    Any idea?

    I'm not in a position to experiment, but am wondering if an LDAP query could pick up other types of address from a directory. If your backoffice mail server is Exchange, could a query pick up an address from a Contact object?

  • Changing a switch case for a for loop

    hi wise ones
    I'm getting parameters from an html form and putting them into an array,
    then checking if any positions in the array [fields of  the form] were blank. I want to generate an error message stating which fields the user left blank but I'm ending up reproducing the error text (4 TIMES!!!!!) for each position in the array. I've used a switch case statement but I think it should be a nested loop but am not having success in implementing.
    does anyone have any suggestions?
    thanks
    //get Params from a html form
      String name=req.getParameter("name");
      String email=req.getParameter("email");
      String address=req.getParameter("address");
      String password=req.getParameter("password");
      String empty ="";
       String[] customerDetails={name,email,address,password};
                 for (int i = 0; i < customerDetails.length; i++) {
                         if(customerDetails.toString().equals(empty)){
                   out.println("<HTML>");
                   out.println("<BODY>");
                   out.println("<FORM METHOD=\"POST\" ACTION=\"http://www.mysite/register.html\">");
                   out.println("<H1>Register Error</H1><p>");
                        switch(i){
                        case 0: out.println("You did not enter a name"); break;
                        case 1: out.println("You did not enter an email"); break;
                        case 2: out.println("You did not enter an address"); break;
                        case 3: out.println("You did not enter a password"); break;
                             out.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Go to Register\">");
                             out.println("</FORM>");
                             out.println("</BODY>");
                             out.println("</HTML>");
                             }else{//something else

    thanks for your answers tnguyen, warnerja, morgalr.
    I only want the error to print if one or more of the Strings in the CustomerDetails array are empty so I will need to put the html generating the error message in a conditional statment before?
    I'm not near a compiler at the moment :-(
    if(customerDetails.toString().equals(empty)){
    out.println("<HTML>");
    out.println("<BODY>");
    out.println("<FORM METHOD=\"POST\" ACTION=\"http://www.mysite/register.html\">");
    out.println("<H1>Register Error</H1>");
    for (int i = 0; i < customerDetails.length; i++) {
        if (customerDetails.length() == 0)
            out.println("You did not enter a " + customerDetail);
        else{
            //something else
    out.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Go to Register\">");
    out.println("</FORM>");
    out.println("</BODY>");
    out.println("</HTML>");
    }

  • Statment and condition of sound

    anyone know how to add statment and condition sound in edge animate? for example if I have a many box, and I'll drop in other place, but if wrong place the sound must play, can anyone helpme???

    this my scrip for edit Html file, and in edge animate we just call it. . . and it work, but in statment and condition i confuse
    <script type="text/javascript" charset="utf-8" src="soundmanager2-nodebug-jsmin.js"></script>
              <script type="text/javascript">
              soundManager.url = 'swf/'; // path to .swf files
              soundManager.useHTML5Audio = true; //html audio support
              soundManager.onready(function(){
        var mySound = soundManager.createSound({
        id: 'aSound',
        url: 'sounds/back.mp3' ,//path to the sound
        var mySound = soundManager.createSound({
        id: 'bSound',
        url: 'sounds/M.mp3' ,//path to the sound
        var mySound = soundManager.createSound({
        id: 'cSound',
        url: 'sounds/A.mp3' ,//path to the sound
        var mySound = soundManager.createSound({
        id: 'dSound',
        url: 'sounds/C.mp3' ,//path to the sound
        var mySound = soundManager.createSound({
        id: 'eSound',
        url: 'sounds/N.mp3' ,//path to the sound
                mySound.play(); //this will play your sound on open
              </script>

  • Select Statment condition

    Hi All,
    I have a following select statement.
    SELECT TSTC~PGMNA
      TSTC~TCODE
      TSTCT~TTEXT
      TRDIR~SECU
      INTO CORRESPONDING FIELDS OF TABLE IT_TEST
      FROM ( TSTC inner join tstct on tstcttcode = tstctcode
             INNER JOIN TRDIR ON TRDIRNAME = TSTCPGMNA )
      WHERE PGMNA IN S_PGNAME
        and SPRSL IN S_LKEY.
    in the above code I need to enter a condition that it should look out for only those Tcodes in the table TSTC where TSTC~PGMNA = ' ' " (space) ... so can you please tell me how can I do that.
    thanks,
    Rajeev

    Hi Rajeev,
    SELECT TSTC~PGMNA
    TSTC~TCODE
    TSTCT~SPRSL
    TSTCT~TTEXT
    INTO CORRESPONDING FIELDS OF TABLE IT_TCODELISTING
    FROM ( TSTC inner join tstct on tstcttcode = tstctcode)
    WHERE PGMNA IN S_PGNAME
    and SPRSL IN S_LKEY.
    In your code you are checking using S_PGNAME, if input is not specified in Selection screen it will fectch all records.
    So you can do
    1) check WHERE PGMNA = ' '
    why you are checking using S_PGNAME?
    If you want to use S_PGNAME then
    S_PGNAME-LOW = ' '.
    S_PGNAME-OPTION = 'EQ'.
    S_PGNAME-SIGN = 'I'.
    APPEND S_PGNAME.
    Regards,
    Sunil
    Edited by: Sunil Reddy Sibbala on Feb 5, 2009 5:25 PM

Maybe you are looking for