How can I use a Looper inside a Repeat Region?

I have a Dreamweaver standard Repeat Region applied to a HTML table containing two horizontal loopers. The HTML table is to display a list of company contacts for our members. The loopers display find for the first company but after that they stop. To key the loopers to the company Im using a trick mentioned by Günter Schenk in this thread: http://www.adobeforums.com/webx/.59b524b4/5. He calls it a sub query; at times I use to help myself by using some sort of "sub query" like the following
<br />
<br />Ive linked my looper recordset to the recordset used for the Repeat Region. Heres one of the looper queries:
<br />
<br />$KTColParam1_rsContactFeatures = "-1";
<br />if (isset($_SESSION["kt_login_id"])) {
<br />$KTColParam1_rsContactFeatures = $_SESSION["kt_login_id"];
<br />}
<br />mysql_select_db($database_RNW, $RNW);
<br />$query_rsContactFeatures = sprintf("SELECT DISTINCT list_feature.description_feature, company.id_company, contact_cnt.idpremissions_cnt FROM (((company LEFT JOIN company_to_feature ON company_to_feature.idcompany=company.id_company) RIGHT JOIN list_feature ON list_feature.id_list_feature=company_to_feature.idlistfeature) LEFT JOIN contact_cnt ON contact_cnt.idcompany_cnt=company.id_company) WHERE company.id_company='".$row_rsContactAll['id_company']."' AND company_to_feature.id_feature is not null AND contact_cnt.idpremissions_cnt=%s ORDER BY company.id_company ASC ", GetSQLValueString($KTColParam1_rsContactFeatures, "int"));
<br />$rsContactFeatures = mysql_query($query_rsContactFeatures, $RNW) or die(mysql_error());
<br />$row_rsContactFeatures = mysql_fetch_assoc($rsContactFeatures);
<br />$totalRows_rsContactFeatures = mysql_num_rows($rsContactFeatures);
<br />
<br />This is my link in both quires: WHERE company.id_company='".$row_rsContactAll['id_company']."'
<br />
<br />Heres the code for the connected looper:
<br />
<br /><?php<br />do { // horizontal looper version 3<br />?>
<br />
<br />
<br />
<br />
<br />As I said this works fine for the first item in the list but then it quits. Heres a screen shot of what I dont want: http://www.retirenw.com/images/help/looper_inside_repeat_region.gif
<br />
<br />Is there anyway to change the php for the loopers to make this work?
<br />
<br />Thanks for your help
<table>
<tr>
<td>
<img src="../images/bullet.gif" width="8" height="14" />
</td>
<td>
<?php echo $row_rsContactFeatures['description_feature']; ?>
</td><?php <br />$row_rsContactFeatures = mysql_fetch_assoc($rsContactFeatures);<br />if (!isset($nested_rsContactFeatures)) { <br />$nested_rsContactFeatures= 1;<br />}<br />if (isset($row_rsContactFeatures) && is_array($row_rsContactFeatures) && $nested_rsContactFeatures++ % 1==0) {<br />echo "</tr><tr>";<br />}<br />} while ($row_rsContactFeatures); //end horizontal looper version 3<br />?>
</tr>
</table>

I found an easy solution.
I moved my looper quires out of my head and into my bodyinside the repeat region (the Looper Wizard puts the quires in the head). I put the quires right before my looper code. Finally, I had to make sure my conditional regional code came after the looper quires but before the looper code.

Similar Messages

  • Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?

    Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.

    Hi Jay,
    SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
    SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
    once on each server, and then the variable can be used by all the packages on this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • How can i use Order by inside a sub query in Oracle

    Hi!,
    Please help me, it's an urgent... how can i use Order by clause
    SELECT SalesProductKeyID,ActualUnitPrice,BillDateKeyID,ProductKeyID
    ,Qty,Profit,DD.dDate
    , (SELECT nvl(S.Qty,0) FROM Stock S , DateDimension DD1
    WHERE S.DateKeyID = DD1.DateKeyID AND
    S.ProductKeyID = SF.ProductKeyID AND
    DD1.dDate <= DD.dDate and rownum=1
    ORDER BY DD1.dDate DESC*) as StockQty
    , (SELECT nvl(SUM(Qty),0) from salesfact SF2,DATEDIMENSION DD2
    WHERE SF2.BillDateKeyID=DD2.DatekeyID AND SF2.ProductKeyID=SF.ProductKeyid
    AND DD2.dDate > DD.dDate
    AND DD2.dDATE=DD.dDate
    ) as TotalQtySold
    FROM SalesFact SF INNER JOIN DATEDIMENSION DD
    ON SF.billdatekeyid =DD.Datekeyid
    WHERE
    IsProfitCalculated = 1 AND
    IsSalesFactSuppPopulated =0 AND
    Qty > 0;
    kindly help
    Thank you.

    Actually I'm converting Procedures from SQL Server to Oracle.
    Actual Stored Procedure in SQL Server is as follows.
    SELECT --top 10000 
    SalesProductKeyID,ActualUnitPrice,BillDateKeyID,ProductKeyID
    ,Qty,Profit,DD.Date
    , (SELECT TOP 1 ISNULL(S.Qty,0) FROM dbo.Stock S , dbo.DateDimension DD1
    WHERE S.DateKeyID = DD1.DateKeyID AND
    S.ProductKeyID = SF.ProductKeyID AND
    DD1.Date <= DD.Date
    ORDER BY DD1.Date DESC) as StockQty
    , (SELECT ISNULL(SUM(Qty),0) from salesfact SF2,DATEDIMENSION DD2
    WHERE SF2.BillDateKeyID=DD2.DatekeyID AND SF2.ProductKeyID=SF.ProductKeyid
    AND DD2.Date > DD.Date
    AND DD2.DATE=DD.Date
    ) as TotalQtySold
    --INTO TEMP_Salesfact          
    FROM dbo.SalesFact SF INNER JOIN DATEDIMENSION DD
    ON SF.billdatekeyid =DD.Datekeyid
    WHERE
    IsProfitCalculated = 1 AND
    IsSalesFactSuppPopulated =0 AND
    Qty > 0

  • How can i use one datatable inside the other?

    Hi all,
    i need help ... i have this page that shows information from a relational table... for example a mapped table "Countries" that has a java.util.Set inside named "Cities" and i would like 2 know how can i do this using jsf...
    The display would be like this:
    Brasil
    Rio de Janeiro
    Sao Paulo
    USA
    New York
    Washington
    New Orleans
    And Goes on... So i guess it would be a dataTable inside the other, right? but i dunno how to do it...
    Thanks for any info. cya

    this is somehow a messy example. But just focus on the var attribute of outer datatable and how value attribute of inner datatable is referencing it.
    <h:dataTable id="table1" value="#{pc_City_state.listofstates.states}" var="varstates" styleClass="dataTable">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="StateName" id="text2"></h:outputText>
                        </f:facet>
                        <h:outputText id="text3" value="#{varstates.stateName}" styleClass="outputText">
                        </h:outputText>
                   </h:column>
                   <h:column id="column3">
    <f:facet name="header">
    </f:facet>
              <h:dataTable id="table2" value="#{varstates.cities}" var="varcities" styleClass="dataTable">
                                       <f:facet name="footer">
                                       </f:facet>
                                       <h:column id="column4">
              <f:facet name="header">
              <h:outputText styleClass="outputText" value="CityName" id="text6"></h:outputText>
              </f:facet>
              <h:outputText id="text7" value="#{varcities.cityName}" styleClass="outputText">
              </h:outputText></h:column>
              </h:dataTable>
    </h:column>
    </h:dataTable>

  • How can I use hyperion objects inside ASP?

    I want to access Essbase by hyperion objects with using in ASP.is it possible? if it is possible,how can I do this? I'll be glad if you help me...Thanks...

    Not that I am aware of.. Besides, the data server control is single threaded and would not be a good candidate for web apps..As a research project internally, we created an ASP demo that uses web services to talk to Essbase Deployment Services (Java API).. Let me know if you are interested in seeing that demo and I will give you the URL and a username/password..TimTim TowApplied OLAP, Inc

  • How can i use one dtd inside another dtd

    Hello friends,
    I have read some where that one DTD can be imported into another DTD but idont remember how to do it.
    My question is suppose we have a DTD say xyz.dtd and i am writing a new DTD say abc.dtd, and lets assume that in abc.dtd i have to declare some of the elements of xyz.dtd, so iwant to import xyz.dtd into abc.dtd.
    Can anybody please give me a solution for this.
    Thank you,
    sridhar.

    something similar to this.
    // This is abc.dtd
    <!ELEMENT MESSAGE_NODE (MSGHEADER, MESSAGEBODY)>
    // Include the DTD for the Message Header
    <!ENTITY % MSGHEADER SYSTEM "xyz.dtd">
    %MSGHEADER;

  • How can I use/access files inside an invisible folder?

    I am struggling to get Stylus RMX to show the user libraries option and am discovering that the Lion installer put all the files (8GB) into the Macintosh HD/Users/Library/Application Support/Spectrasonics/SAGE folder, but I cannot see the Macintosh HD/Users/Library Folder to even confirm whether or not the installer added the core library or not.  I tried to make a Library folder in the Users Folder and it said that there was already a folder there named Library that I can't see or access.  It seems like this is fooling Logic also, what can I do here?

    Hi
    In Lion, the <User> Library is hidden by default.
    Easy way to get there in the Finder;
    Use the Go Menu (Hold down Option to sho wthe Library in the Menu)
    HTH
    CCT

  • How do we use if statement in labview?moreover can i use if statement inside for loop?

    how do we use if statement in labview?moreover can i use if statement inside for loop?

    The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
    Attachments:
    For_Loop_with_Case.jpg ‏21 KB

  • How can i use the same cursor in a loop fro multipletimes.

    I am using two cursors.One to fetch sites and the other to fetch participants under each site.I am performing some job with that participants data.Now the problem is i am using the 2nd cursor in a loop.So it fetches the data of participants falling under one state.But when it comes to the second state,as the second cursor is already open it is unable to fetch the records.Please help me .How can i use the same cursor in a loop fro multipletimes.
    I am sending the code which i have written in When-Button-Pressed-Trigger...
    declare
         sid number;
         pid number;
    cursor csid is select distinct(site_id) from cyber_ppt;
    cursor cpid is select pc_id,st_dt,ed_dt from cyber_ppt where site_id = sid;
         stdt varchar2(10);
         eddt varchar2(10);
         nom number;
         stmonth varchar2(10);
         edmonth varchar2(10);
         cjan number:=0;
         cfeb number:=0;
         cmar number:=0;
         capr number:=0;
         cmay number:=0;
         cjun number:=0;
         cjul number:=0;
         caug number:=0;
         csep number:=0;
         coct number:=0;
         cnov number:=0;
         cdec number:=0;
         i number:=1;
    begin
         open csid ;
         loop
         fetch csid into sid;
              exit when csid %notfound;
              message(sid);
         open cpid;
         loop
         fetch cpid into pid,stdt,eddt ;
         exit when cpid %notfound;
         message(sid||'-'||pid);
         stmonth:=substr(stdt,4,3);
         edmonth:=substr(eddt,4,3);
         nom:= months_between(eddt,stdt);
    while i <= round(nom)
         loop
         stmonth:=substr(stdt,4,3);
    if stmonth='JAN' then
              cjan:=cjan+1;
    elsif stmonth='FEB' then
              cfeb:=cfeb+1;
    elsif stmonth='MAR' then
              cmar:=cmar+1;
    elsif stmonth='APR' then
              capr:=capr+1;
    elsif stmonth='MAY' then
              cmay:=cmay+1;
    elsif stmonth='JUN' then
              cjun:=cjun+1;
    elsif stmonth ='JUL' then
              cjul:=cjul+1;
    elsif stmonth ='AUG' then
              caug:=caug+1;
    elsif stmonth ='SEP' then
              csep:=csep+1;
    elsif stmonth ='OCT' then
              coct:=coct+1;
    elsif stmonth ='NOV' then
              cnov:=cnov+1;
    elsif stmonth ='DEC' then
              cdec:=cdec+1;
    end if;
         stdt:=add_months(stdt,1);
         i:=i+1;
         end loop;
         end loop;
         end loop;
         end;
         

    try this /* untested */
    DECLARE
    sid           NUMBER;
    pid           NUMBER;
    CURSOR csid IS SELECT DISTINCT(site_id) FROM cyber_ppt;
    CURSOR cpid(nSid NUMBER) is SELECT pc_id,st_dt,ed_dt FROM cyber_ppt WHERE site_id = nSid;
    stdt        VARCHAR2(10);
    eddt        VARCHAR2(10);
    nom         NUMBER;
    stmonth     VARCHAR2(10);
    edmonth     VARCHAR2(10);
    cjan         NUMBER:=0;
    cfeb         NUMBER:=0;
    cmar         NUMBER:=0;
    capr         NUMBER:=0;
    cmay         NUMBER:=0;
    cjun         NUMBER:=0;
    cjul         NUMBER:=0;
    caug         NUMBER:=0;
    csep         NUMBER:=0;
    coct         NUMBER:=0;
    cnov         NUMBER:=0;
    cdec         NUMBER:=0;
    i            NUMBER:=1;
    BEGIN
    FOR rec IN csid
    LOOP
                      sid := rec.csid;
    FOR cRec IN cpid(sid)
    LOOP
                     pid := cRec.pc_id;
                     stdt := cRec.st_dt;
                     eddt := cRec.ed_dt;
    stmonth:=  SUBSTR(stdt,4,3);
    edmonth:= SUBSTR(eddt,4,3);
    nom:= months_between(eddt,stdt);
    WHILE i <= round(nom)
    LOOP
              stmonth := SUBSTR(stdt,4,3);
    IF stmonth='JAN'
    THEN
             cjan:=cjan+1;
    ELSIF stmonth='FEB' THEN
             cfeb:=cfeb+1;
    ELSIF stmonth='MAR' THEN
              cmar:=cmar+1;
    ELSIF stmonth='APR' THEN
              capr:=capr+1;
    ELSIF stmonth='MAY' THEN
              cmay:=cmay+1;
    ELSIF stmonth='JUN' THEN
              cjun:=cjun+1;
    ELSIF stmonth ='JUL' THEN
              cjul:=cjul+1;
    ELSIF stmonth ='AUG' THEN
              caug:=caug+1;
    ELSIF stmonth ='SEP' THEN
              csep:=csep+1;
    ELSIF stmonth ='OCT' THEN
              coct:=coct+1;
    ELSIF stmonth ='NOV' THEN
              cnov:=cnov+1;
    ELSIF stmonth ='DEC' THEN
              cdec:=cdec+1;
    END IF;
             stdt:=add_months(stdt,1);
             i:=i+1;
    END LOOP;
    END LOOP;
    END LOOP;
    END;

  • How can I use "write to spreadsheet" during the data is taking but not the end of all the loops

    Hi,
    I have to run an experiment on Labview 6 or 5. I don't have Labview 7 on that computer for some reason. My experiment is talking about 1000 hours, and I have a probelm on storing the data. Right now I am using "Write to spread sheet" and I set the "append" to false. And the data is installed at the end of the experiment, that means after 1000 hours. In the mean time if somthing oges wrong like power cut or what, I will lose all the data. So what I want to do is to save the data evertime when the data is took. I tired to set the "append" to true, but it does not let me to choose the "file path"--- when I choose this and select write on new or excisting file, it said" you may not be able to save on a exciting file" and it does not let me create a new file either. If anyone have the lidea like how can I use the "wrtie to spreadsheet" function and at the same time can install the data everytime inside the look, please let me know. Thanks alot.
    KL

    KL,
    It sounds like you want to periodically save your data so it is in smaller files. (great idea) For this operation you will not want to append the data...if something happens to your system while the file is open it could become corrupt and ruin all the data. You need to write the new block of data to a new file every time. Now...this depends on how big your data is...if you only have like 500k of data to write in a block you should probably write several blocks before starting a new file. I don't know enough about how much data you are acquiring. In either case...the write to spreadsheet file.vi will need a different name each time it is called and you will not want to append. Append = false.
    -Brett

  • How to insert delay without using loops, and how can I use variable to store data in labview

    Hi all,
    I am new to Labview and I realized that quite often I am in condition to require a delay beween two functions or elements.. how can we insert a delay in such cases?
    I know how to use delays in a loop. but don't know how to inser some time delay between two elements.
    I have one more question, I know its a bad practice to post 2 questions in 1 thread.
    How can I use a temporary variable to store data, So far I am storing it in an indicator by making it invisible in front panel and making local variable of that indicator, is it the right way to do it ?
    Thanks in advance.

    Generally, LV doesn't have variables in the same sense that most languages do. You can use indicators to perform the same function as variables, but as Adnan pointed out, you run the risk of having race condition and it creates data copies, which is a problem if you have a lot of data. In most cases, you should use wires to perform the function of variables, which is to store data and make it available to the different functions in your code. Instead of thinking about variables, you need to think about data (something like "I have the data coming out of this function. Where does it need to go?").
    Try to take over the world!

  • Can't we use while loop inside a fn

    i am using a while loop inside a fn
    it is showing error
    the code is
    while (a=1) loop
    some condition
    end loop;
    the error is
    PLS-00103: Encountered the symbol "WHILE" when expecting one of
    the following:
    * & = - + < / > at in is mod not rem then <an exponent (**)>
    <> or != or ~= >= <= <> and or like between overlaps || year
    DAY_
    The symbol "*" was substituted for "WHILE" to continue.
    PLS-00103: Encountered the symbol "LOOP" when expecting one of
    the following:
    . ( * % & = - + < / > at in is mod not rem then
    <an exponent (**)> <> or != or ~= >= <= <> and or like
    between ||
    what is the error

    It looks like the OP misskeyed the assignment operator and got compilations errors, and from that assumed that you can't use WHILE loops in functions on a Tuesday.
    Message was edited by:
    William Robertson
    I was thinking of his is it possible to increment a value in a function, though I suspect the problem is similar.

  • How can i use JSTL inside custom tag attribute

    Hi,
    I have one button tag which displays the button with round corner. I will show the button like this:
    <ep:button key="buttons.submit" name="submitBtn" styleClass="But"
              onClick='submitPage(''<c:out value='${buttonName}' />)' />
    I am getting the problem with the above code. how can i use JSTL inside the custom tags.
    Thanks in Advance,
    LALITH

    No. The details are given below:
    I have included the follwing line in web.xml file:
    <taglib>
        <taglib-uri>/tags/button</taglib-uri>
        <taglib-location>/WEB-INF/button.tld</taglib-location>
      </taglib>button.tld file
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>2.0</jspversion>
         <shortname>button</shortname>
         <tag>
              <name>button</name>
              <tagclass>com.ksi.ep.web.taglib.ButtonTag</tagclass>
              <bodycontent>empty</bodycontent>
              <attribute>
                   <name>name</name>
                   <required>true</required>
                   <rtexprvalue>false</rtexprvalue>
              </attribute>
              <attribute>
                   <name>key</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>onClick</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
    </taglib>ButtonTag.java :
    public class ButtonTag extends TagSupport {
       private static final long serialVersionUID = 6837146537426981407L;
         * Initialise the logger for the class
        protected final transient Log log = LogFactory.getLog(ButtonTag.class);
         *  holds the Value of the button tag
        protected String onClick = null;
         *  holds message resources key
        protected String key = null;
         * The message resources for this package.
        protected static MessageResources messages =
                             MessageResources.getMessageResources
                                       ("ApplicationResources");
          *  (non-Javadoc)
          * @see javax.servlet.jsp.tagext.TagSupport#doStartTag()
         public int doStartTag() throws JspException {    
            StringBuffer label = new StringBuffer();         
            HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
            try {             
                   log.debug("in doStartTag()");
                   Locale locale = pageContext.getRequest().getLocale();
                 if (locale == null) {
                     locale = Locale.getDefault();
                 log.info("");
                 label.append("<a border=\"0\" style=\"text-decoration:none;color:#FFFFFF\" href=\"JavaScript:");
                 label.append(onClick);
                 label.append("\" >");
                   label.append("<table  onClick=\"");
                   label.append(onClick);               
                   label.append("\" ");
                   if(onmouseout!=null && !"".equalsIgnoreCase(onmouseout))
                    label.append(" onmouseout=\"");
                    label.append(onmouseout);               
                    label.append("\" ");
                   if(onmouseover!=null && !"".equalsIgnoreCase(onmouseover)){
                    label.append(" onmouseover=\"");
                    label.append(onmouseover);               
                    label.append("\" ");
                   if(title!=null && !"".equalsIgnoreCase(title)){
                    label.append(" title=\"");
                    label.append(title);               
                    label.append("\" ");
                   label.append("style=\"cursor:hand\" tabindex=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"");
                   label.append(request.getContextPath());
                   label.append(System.getProperty("file.separator"));
                   label.append("images");
                   label.append(System.getProperty("file.separator"));
                   label.append("background1.jpg\" > ");
                 label.append("<tr><td width=\"10\"><img  border=\"0\" src=\"");
                 label.append(request.getContextPath());
                   label.append(System.getProperty("file.separator"));
                   label.append("images");
                   label.append(System.getProperty("file.separator"));
                 label.append("leftcorner.jpg\" ></td> ");
                 label.append("<td valign=\"middle\"  style=\"padding-bottom:2px\"><font color=\"#FFFFFF\" style=\"");
                 label.append(styleClass);
                 label.append("\">");
                 label.append(messages.getMessage(key));
                 label.append("</font></td>");
                 label.append("<td width=\"10\" align=\"right\"><img src=\"");
                 label.append(request.getContextPath());
                   label.append(System.getProperty("file.separator"));
                   label.append("images");
                   label.append(System.getProperty("file.separator"));            
                 label.append("rightcorner.jpg\" border=\"0\"  ></td>");
                 label.append("</tr></table></a>");
                 pageContext.getOut().print(label.toString());
              } catch (Exception e) {               
                   log.error("Exception occured while rendering the button", e);
                   throw new JspException(e);
            return (SKIP_BODY);
         * Release all allocated resources.
        public void release() {       
            this.name=null;
            this.key=null;
            this.onClick=null;
    }In my JSP I have mentioned the taglib directive as
    <%@ taglib uri="/tags/button" prefix="ep"%>and
    <ep:button key="buttons.submit" name="submitBtn" styleClass="But"
         onClick='overwritePreApprovals('<c:out value='${transactionalDetails['inPrepList']}' />')' />Servlet.service() for servlet action threw exception
    org.apache.jasper.JasperException: /pages/pms/coordinator/Dashboard.jsp(325,48) Unterminated <ep:button tag
    Thanks,
    LALITH

  • How can i use multiple row subquery in update statement

    Hai All
    I using group function in my update statement.. and i need to update more rows so i need to use multiple row
    subquery pls tell me how to use multiple row subquery in update statement
    For example
    while i am using this like this i got an error
    update dail_att set outtime in (select max(r2.ptime) from temp_att where empcode=r2.enpno and
    barcode=r2.cardn and attend_date=r2.pdate group by enpno,pdate,cardn);
    Pls tell me how to use with example
    Thanks & regards
    Srikkanth.M

    Hai Man
    Thanks for ur response Let me clear what i need
    First step Fetch the records as text file and stores into table T1
    and the next step is i have seperated the text using substring and stores in different columns of a table
    There are two shifts 0815 to 1645 and 1200 and 2000
    Here I rep IN and O rep OUT
    Empno date time inout
    001 01-01-10 0815 I
    002 01-01-10 0815 I
    003 01-01-10 0818 I
    001 01-01-10 1100 0
    001 01-01-10 1130 I
    002 01-01-10 1145 0
    002 01-01-10 1215 I
    004 01-01-10 1200 I
    005 01-01-10 1215 I
    004 01-01-10 1315 O
    004 01-01-10 1345 I
    001 01-01-10 1645 0
    002 01-01-10 1715 0
    003 01-01-10 1718 0
    004 01-01-10 2010 0
    005 01-01-10 2015 0
    This is my T1 table i have taken data from text file and stored in this table from this table i need to move data to another table T2
    T2 contains like this
    Empno Intime Intrin Introut Outtime Date
    001 0815 1100 1130 1645 01-01-10
    002 0815 1145 1215 1715 01-01-10
    003 0818 1718 01-01-10
    004 1200 1315 1345 2010 01-01-10
    005 1215 2015 01-01-10
    This what i am trying to do man but i have little bit problems Pls give some solution with good example
    And my coding is
    declare
         emp_code varchar2(25);
    in_time varchar2(25);
    out_time varchar2(25);
    Cursor P1 is
    Select REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    From temp_att
    group by REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    ORDER BY enpno,pdate,ptime;
    begin
         for r2 in p1 loop
    declare
    bar_code varchar2(25);
    begin
    select barcode into bar_code from dail_att where empcode=r2.enpno and attend_date=r2.pdate;
    For r3 in (select empcode,empname,barcode,intime,intrin,introut,addin,addout,outtime,attend_date from dail_att)loop
    if r2.inout ='O' then
    update dail_att set outtime =(select max(r2.ptime) from temp_att where empcode=r2.enpno and barcode=r2.cardn and attend_date=r2.pdate group by r2.cardn,r2.enpno,r2.pdate );
    end if;
    end loop;     
    exception
         when no_data_found then
         if r2.inout ='I' then
                   insert into dail_att(barcode,empcode,intime,attend_date)(select r2.cardn,r2.enpno,min(r2.ptime),r2.pdate from temp_att group by r2.cardn,r2.enpno,r2.pdate );
         end if;
    end;
    end loop;
    commit;     
         end;
    Pls tell me what correction i need to do i the update statement i have used a subquery with group function but when i used it will return only one row but my need is to return many rows and i need to use multiple row subquery
    and how can i use it in the update statement
    Thanks In Advance
    Srikkanth.M

  • How Can i Use two Different Public IP Addresses no my DMZ with ASA Firewall.

    How To Using Two Different Public IP Address on My DMZ with ASA 5520
    Postado por jorge decimo decimo em 28/Jan/2013 5:51:28
    Hi everyone out there.
    can any one please help me regarding this situation that im looking for a solution
    My old range of public ip address are finished, i mean (the 41.x.x.0 range)
    So now i still need to have in my DMZ another two servers that will bring some new services.
    Remember that those two server, will need to be accessable both from inside and from outside users (Internet users) as well.
    So as i said, my old range of public ip address is finished and we asked the ISP to gives some additional public
    ip address to address the need of the two new servers on DMZ. and the ISP gave us the range of 197.216.1.24/29
    So my quation is, on reall time world (on the equipment) how can i Use two different public ip address on the same DMZ
    on Cisco ASA 5520 v8??
    How my configuration should look like?
    I was told about implementing static nat with Sub Interfaces on both Router and ASA interface
    Can someone please do give me a help with a practical config sample please. i can as well be reached at [email protected]
    attached is my network diagram for a better understanding
    I thank every body in advance
    Jorge

    Hi,
    So looking at your picture you have the original public IP address range configured on the OUTSIDE and its used for NAT for different servers behind the ASA firewall.
    Now you have gotten a new public IP address range from the ISP and want to get it into use.
    How do you want to use this IP address range? You want to configure the public IP addresses directly on the servers or NAT them at the ASA and have private IP addresses on the actual servers (like it seems to be for the current server)?
    To get the routing working naturally the only thing needed between your Router and Firewall would be to have a static route for the new public network range pointing towards your ASA OUTSIDE IP address. The routing between your Router and the ISP core could either be handled with Static Routing or Dynamic Routing.
    So you dont really need to change the interface configuration between the Router and ASA at all. You just need a Static route pointing the new public IP address towards the ASA outside IP address.
    Now when the routing is handled between the ISP - ISP/Your Router - Your Firewall, you can then consider how to use those IP addresses.
    Do you want to use the public IP addresses DIRECTLY on the HOSTS behind the firewall?This would require you to either configure a new physical interface with the new public IP address range OR create a new subinterface with the new public IP addresses range AND then configure the LAN devices correspondingly to the chosen method on the firewall
    Do you want to use the public IP addresses DIRECLTY on the ASA OUTSIDE as NAT IP addresses?This would require for you to only start configuring Static NAT for the new servers between the inside/dmz and outside interface of the ASA. The format would be no different from the previous NAT configuration other than for the different IP addresses ofcourse
    Of the above ways
    The first way is good because the actual hosts will have the public IP addresses. Therefore you wont run into problems with DNS when the LAN users are trying to access the server.
    The second way is the one requiring the least amount of configurations/changes on the ASA. In this case though you might run into problem with DNS (to which I refer above) as the server actually has a private IP address but the public DNS might reply to the LAN hosts with a public IP address and therefore connections from LAN could fail. This is because LAN users cant connect to the servers OUTSIDE NAT IP address (unless you NAT the server to public IP address towards LAN also)
    Hopefully the above was helpfull. Naturally ask more specific questions and I'll answer them. Hopefully I didnt miss something. But please ask more
    I'm currently at Cisco Live! 2013 London so in the "worst case" I might be able to answer on the weekend at earliest.
    - Jouni

Maybe you are looking for

  • Apple Loops Questions

    1) Where does Logic store user-created loops that I've added to the library? 2) What is the easiest/best way to convert a regular .aiff or .wav file into an apple loop? 3) I'm getting a lot of artifacts when I use loops I created--even when the loop

  • Creation of production order while mrp run

    hi ppgurus can any body explain how to create a production order by mrp run ie sysytem should create the production order directly while mrp run not PLANNED ORDERS what settings i need to do for  this plz explain urgent requirement regards sasikanth

  • Send Output to multiple mediam

    Hi WE have a scenario where we want to issue billing out out (ZV01) to Fax, To printer and to email to different people. Is it possible?? e,g, I created a billing document which has output type ZV01, which we want to go through the Fax to the custome

  • Downgrade from 10.3?

    I installed Panther to my G4, and it's acting strange. Two of the error messages I get are: "System Extension Cannot be Used--extensions installed improperly" and it references the symosxkerne/utilities/kext and deletetrap.kext extensions. Also, I'm

  • How to run oracle stored procedure dynamically

    How can I call a stored procedure dynamically. My requirement is to call a stored procedure based on user selection on a parameter screen. I do not want to hardcode proocedure name, but rather call dynamically. If I use the same methodology as of run