Loop through select and create cursor

Is it possible to create a cursor after looping through a select?
      FOR TEST IN
        SELECT *
          FROM SOMETABLE
         WHERE SOMEID > 100
       ) LOOP
          IF TEST.NAME = 'AB' THEN
               --CREATE CURSOR AND LOAD DATA
               --LOAD TEST.ID, TEST.NAME, TEST.ADATE INTO NEW CURSOR
          END IF;
       END LOOP;     This is just a sample not the actual scenario.

SeshuGiri wrote:
Is it possible to create a cursor after looping through a select?Yes. But is also usually the wrong thing to do.
A cursor loop within another cursor loop is known as a nested loop join in SQL. The SQL language is perfectly able to do joins like that. And far better and faster. It has a very clever optimiser and has more sophisticated algorithms than just a nested loop, for joining data sets.
The sample code you've posted shows a very old 80's style Cobol approach to processing ISAM files or magnetic tape. In a row-by-row fashion.
This approach does not scale in the modern database, where the SQL language is a data set processing language - and not an I/O interface for merely reading a record/row and writing a record/row as we did in the 80's with file-based data records.
The basic approach to Oracle is: Maximise SQL. Minimise PL/SQL (Java/etc).
This means using the very flexible, incredibly powerful, SQL language first and foremost to crunch database data. And only when the processing is beyond the capability of the SQL language alone, employ PL/SQL. Else restrict PL/SQL to managing only the process flow and error handling of SQL language statements.

Similar Messages

  • Looping through folders and subfolders

    Hi,
    I'm about to create a script to check some tifs and jpgs for the right height and width, resolution and so on.
    I could get it to work if I see the files in the content panel (looping through the files by app.document.getSelection ...
    The script needs to check many files in different subfolders (all in one parent folder), so I don't like to use a collection to reveal all files of all subfolders first and then start the script.
    My plan is to choose the parent folder in the folder panel and the script should  loop through each file of each subfolder ...
    So maybe there's someone who knows a solution for this problem, it would be great!
    Thanks a lot,
    Sebastian.

    Wow,
    That was fast, I'll test it tommorow in the morning, thanks a lot so far!
    Hopefully I'll be able to get our scripts together...
    Thanks
    Sebastian
    Am 05.08.2012 um 20:13 schrieb Paul Riggott <[email protected]>:
    Re: looping through folders and subfolders
    created by Paul Riggott in Bridge Scripting - View the full discussion
    This should get you started...
    #target bridge  
    var folders =[];
    folders = FindAllFolders(Folder(app.document.presentationPath), folders);
    folders.unshift(Folder(app.document.presentationPath));
    for(var a in folders){
    var fileList = folders[a].getFiles(/\.(jpg|tif)$/i);
    for(var p in fileList){
    var thumb = new Thumbnail(fileList[p]);
    var height = thumb.core.quickMetadata.height;
    var width = thumb.core.quickMetadata.width;
    var Resolution = thumb.core.quickMetadata.xResolution;
    if(Resolution ==0) Resolution =72;
    //do your processing here
    //$.writeln(decodeURI(thumb.spec) + "," + height + "," + width + "," + Resolution);
    function FindAllFolders( srcFolderStr, destArray) {
    var fileFolderArray = Folder( srcFolderStr ).getFiles();
    for ( var i = 0; i < fileFolderArray.length; i++ ) {
      var fileFoldObj = fileFolderArray[i];
      if ( fileFoldObj instanceof File ) {  
      } else {
             destArray.push( Folder(fileFoldObj) );
      FindAllFolders( fileFoldObj.toString(), destArray );
    return destArray;
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4599891#4599891
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4599891#4599891. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Bridge Scripting by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Help with Trigger - looping through SELECT results

    How do I loop through a SELECT query within a Custom Trigger? I can
    execute the query fine, but the PHP mysql_xxx_xxx() functions don't
    appear to work inside a custom trigger. For example:
    This ends up empty:
    $totalRows_rsRecordset = mysql_num_rows($rsRecordset);
    While this returns the correct # of records:
    $totalRows_rsRecordset = $rsRecordset->recordCount();
    I need to loop through the records like I would with
    mysql_fetch_assoc(), but those mysql_xxx_xxx() don't seem to work.
    This works great outside a custom trigger, but fails inside a custom
    trigger:
    do {
    array_push($myArray,$row_Recordset['id_usr']);
    while ($row_Recordset= mysql_fetch_assoc($Recordset));
    What am I missing?
    Alec
    Adobe Community Expert

    Although the create trigger documentation does use the word "must", you are quite free to let the trigger fire during a refresh of the materialized view. Generally, you don't want the trigger to fire during a materialized view refresh-- in a multi-master replication environment, for example, you can easily end up with a situation where a change made in A gets replicated to B, the change fired by the trigger in B gets replicated back to A, the change made by the trigger in A gets replicated back to B, in an infinite loop that quickly brings both systems to their knees. But there is nothing that prevents you from letting it run assuming you are confident that you're not going to create any problems for yourself.
    You do need to be aware, however, that there is no guarantee that your trigger will fire only for new rows. For example, it is very likely that at some point in the future, you'll need to do a full refresh of the materialized view in which case all the rows will be deleted and re-inserted (thus causing your trigger to fire for every row). And if your materialized view does anything other than a simple "SELECT * FROM table@db_link", it is possible that an incremental refresh will update a row that actually didn't change because Oracle couldn't guarantee that the row would be unchanged.
    Justin

  • How to Loop through App and finding popup Windows

    Does anyone know how to loop through the app and find any
    popup windows..

    I guess application by default creates a SystemManager
    object... So i used
    this.systemManager.popUpChildren.numChildren and it gives me
    0 all the time.. even though I have instances of windows to the
    app.. According to the documentation this should give you the
    number of popup children but it doesn't.. Any more ideas?

  • Loop through CSV to create XML

    Hello all, first and foremost I want to apologize if this has been answered somewhere, but I am looking to do the following:
    I have 500 records I need put in XML format. The records are currently in CSV format. I can use curl to upload a record in XML format using our applications API. I was under the impression that I could generate 1 large XML file and upload the entire group.
    I have a script that will read in data from a CSV and output it to a file in XML format. I got the script the way I thought I needed it working, which was to create a new xml file, append a line to it, then loop through the csv and echo my string repeatedly inputing the variables from the CSV file. I could then upload the XML file where I needed it.
    As it turns out, it seems the API will only allow me to upload 1 record at a time. (ALMOST pointless IMO.) So what I am looking to do is change the way the script loops through the CSV file, and instead of creating 1 large file, I would like the script to loop through the CSV one line at a time, create the XML file of only 1 record, upload it using curl, delete itself (or its contents) and repeat that process throughout the entire CSV file.
    I am just getting familiar with loops, so Im not sure how I would even start this process, or even word what I want properly to search google. (Which I have been for the last two days, thats how I frankenstiened what I have below. Any help would be greatly appreciated.
    The script is as follows:
    #!/bin/bash
    echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' >> xmldata.xml
    #:Read variables from XMLInput.csv:#
    while read inputline;do
    line0="$(echo $inputline | cut -d, -f1)"
    line1="$(echo $inputline | cut -d, -f2)"
    #:Set auto increment ID:#
    idAdd0=$((idAdd0 +1))
    #:removes trailing alpha characters leaving only the IP address:#
    cutLine0=${line0//[^0-9.]/}
    #:Strips trailing octet and appends .1:#
    startIP=`echo $cutLine0 | sed 's/.[0-9]*$/.1/'`
    #:Strips trailing octet and appens 254:#
    endIP=`echo $cutLine0 | sed 's/.[0-9]*$/.254/'`
    #:echos line to txt file as XML:#
    echo "<network_segment><id>"$idAdd0"</id><name>$line0</name><starting_address>$startIP</starting_address><ending_address>$endIP</ending_address><distribution_point/><url/><netboot_server/><swu_server/><building>$line1</building><department/><override_buildings>false</override_buildings><override_departments>false</override_departments></network_segment>" >> xmldata.xml
    done < XMLInput.csv
    exit 0

    What I ended up doing was having the script create 500 separate XML files in a folder by adding my auto increment variable to the XML file name,
    then curling each file as a separate entry. A litte dirtier than I wanted, but in the end, I didn't have to manually enter 500 subnets
    and define there locations in a website. Job Done.
    Script if interested:
    #!/bin/bash
    #:Read variables from XMLInput.csv:#
    while read inputline;do
    line0="$(echo $inputline | cut -d, -f1)"
    line1="$(echo $inputline | cut -d, -f2)"
    echo
    #:Set auto increment ID:#
    idAdd0=$((idAdd0 +1))
    #:removes trailing alpha characters leaving only the IP address:#
    cutLine0=${line0//[^0-9.]/}
    #:Strips trailing octet and appends .1:#
    startIP=`echo $cutLine0 | sed 's/.[0-9]*$/.1/'`
    #:Strips trailing octet and appens 254:#
    endIP=`echo $cutLine0 | sed 's/.[0-9]*$/.254/'`
    #:echos line to txt file as XML:#
    echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'"<network_segment><id>"$idAdd0"</id><name>$line0</name><starting_address>
    $startIP</starting_address><ending_address>$endIP</ending_address><distribution_point/><url/><netboot_server/><swu_server/><building>$line1</building>
    <department/><override_buildings>false</override_buildings><override_departments>false</override_departments></network_segment>" >> xmldata$idAdd0.xml
    #:upload XML file to JSS:#
    `curl -k -v -u account:Password https://server address/JSSResource/networksegments/name/SegmentName -T "xmldata$idAdd0.xml" -X POST`
    done < XMLInput.csv
    exit 0

  • Looping through Collection and getting ConcurrentModificationException

    I'm trying to loop through a collection to delete some objects referenced by that collection but keep coming up against a ConcurrentModificationException.
    BwView view = svci.getViewsHandler().find("Lists");
                  Collection<BwSubscription> subarr = new TreeSet<BwSubscription>();
                  subarr = svci.getSubscriptionsHandler().getAll();  
                  if (subarr == null) {
                       logger.info("Its not working");
                  for (BwSubscription sub: subarr) {
                       logger.info("Removing subs " + sub);
                       svci.beginTransaction();
                       svci.getSubscriptionsHandler().delete(sub);
                       logger.info("Deleting calendars :" + sub);
                       svci.endTransaction();
                 The loop is allowing me to delete the first entry but then fails with the exception.
    I have tried with a generic loop but this doesn't initialise the sub entity so the loop fails and is ignored leading to problems later in the code.
    BwView view = svci.getViewsHandler().find("Lists");
                  BwSubscription[] subarr = (BwSubscription[])view.getSubscriptions().toArray(new BwSubscription []{});
                  if (subarr == null) {
                       logger.info("Its not working");
                  for (int i=subarr.length - 1; i>=0; i--) {
                       sub = subarr;
                   logger.info("Removing subs " + sub);
                   svci.beginTransaction();
                   svci.getSubscriptionsHandler().delete(sub);
                   logger.info("Deleting calendars :" + sub);
                   svci.endTransaction();
    Sub is either not initialised or gets initialised as 0 causing an ArrayIndexOutofBoundsException. I'd be grateful for some advice on getting the code to loop correctly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    While iterating over a collection (using its iterator), a ConcurrentModificationException will be thrown if the collection is modified, except if it is modified using the iterator itself.. The enhanched for-loop you're using is iterating over the collection by implicitly using an Iterator. To do what you want, make the Iterator explicit (change the enhanced for-loop to a while loop) and then use iterator.remove().

  • Looping through elements and assigning the proper attributes

    So I'm trying to loop through all my xml elements. I then
    want to loop through an element and an elements child and all
    attributes assigned inside. Does this make sense, I hope so? This
    is for an on going Cascading menu I have been building. So
    basically every element inside an element would be a submenu of a
    menu. Here is what I have....

    Okay. Much better subject line this time. :)
    You apparently know what a factorial is. You need to multiply the input by all numbers less than it (except for special case of 0! [but, then, you tell them to enter a number between 1 and 12]).
    You don't want your loop to be "while (true)". You can either start at 1 and work your way up to the input number, or start at the input number and work your way down. You may want a 'for' loop instead of a 'while' loop.
    In this (and most cases), think about how you would calculate factorials manually. Write it down in English. Then, translate it to code.
    You've been working on factorials for a while now. You haven't found the algorithm yet?

  • I am running OS X 10.9.1 on a MacBook Air....I had keychain issues that I bumbled my way through - deleted and created a new Keychain....now a box appears pretty regularly, wanting my Keychain login....i enter it and it's accepted and the box disappears.

    Help..!!  I'm running OS X 10.9.1 on a MacBook Air.  I had keychain issues with passwords etc and bumbled my way out of it by deleting the current keychain and creating a new one with a new log-in (yes, I wrote it down this time!)  But now these little boxes appear wanting my log-in ie. calendar, Safari, Outlook) and its annoying....entering the login gets rid of the box but what a pain and I know it's not right.....I know I need to enter somekind of automatic logins to these apps but how do I do that....and go easy on me, I'm not computer savvy.

    Did you install the latest driver set for the device?  there is a new release on motu.com for mavericks.
    rachel

  • HELP! FOR LOOP TO SCROLL THROUGH TABLE AND CREATE DATABASE LINK

    Hi,
    Here's the scenario, not much of a PL programmer, just basic SQL so really need some help people!
    I have 2 tables. 1 contains list of DB's and the other contains rules to follow.
    I need to create a loop that goes through the table containing the DB's and on each row a DB link is created (Only 1 link allowed!)
    Once created, the schema currently logged in with also has an account on the linked DB in order to run scripts- The scripts are stored centrally hence the requirement for the link to the target DB.
    There are numerous scripts that need to be executed and can all be called from 1 script, once executed the loop exists and the database link needs to be dropped.
    Once dropped, the first loop continues, creating a DB link for the next DB listed in the table (and all the scripts are fired again)
    This continues against all the DB's listed in the table.

    Hi BlueShadow,
    Thanks again for the response, you've hit the nail on the head. SQL scripts on a unix server, a loop goes through a table 1 at a time. Each row gets a link created and then all the scripts stored on the server are executed against the db linked to. So I'm assuming this is a loop within a loop.
    1 loop to go through the table to create the link and then another loop within once connected to execute all the scripts against the connected DB. Once the scripts are run, the loop exits and moves onto the next server and so on until all the servers have the scripts are run.
    It's PL/SQL scripts we're after and not shell scripts as this would free us from the OS constraints.
    We have to drop the links due to security. Any idea on o

  • Possible to do? Take Looped selection and create regions/duplicate?

    If you have a looped selection, wondering if its possible to take that section and repeat it without have to cut every track with the sissors tool.
    Also, something weird, when I import say a garage band mix or use a aiff loop and repeat it, sometimes the repeats are grey and sometimes they show the wave form. When I use the glue tool to connect the parts, nothing happens. They stay seperated.
    Thanks!

    Yes, you can split objects by locators amongst other things - pull up the keyboard shortcuts window and do a search. My keystroke is 'apple'+'/' to split by locators for example, though it may not be the default.
    The thing you are talking about with the greyed out loops is the loop function in logic, this can come about by hitting 'L' or by dragging the top right hand corner of an object. If you want to consolidate parts you'll need to copy them properly. If the object is exactly the right length (ie 1 bar) and you want 7 more bars of the same thing - hit 'R' (repeat). There are some options with the R function that you can look up in the manual. All pretty easy stuff really.
    Best of luck with it.

  • Insert, select and create table as give different results

    Hi all
    I have a strange situation with this three cases:
    1) select statement: SELECT (...)
    2) insert statement with that same select as above: INSERT INTO SELECT (...)
    3) create table statement again with that same select: CREATE TABLE AS SELECT (...)
    Each of these cases produce different number of rows (first one 24, second 108 and third 58). What's more the data for second and third case doesn't have any sense with what they should return. The first case returns good results.
    One interesting thing is that select uses "UNION ALL" between 2 queries. When simple UNION is used, everything works fine and all three cases return 24 rows. Also if each query is run seaprately, they work fine.
    Anyone encountered something like this? (before i create an SR :)
    Database is 10.2.0.2 on AIX 5.3. It's a data warehouse.
    Edited by: dsmoljanovic on Dec 10, 2008 3:57 PM

    I understand UNION vs UNION ALL. But that doesn't change the fact that same SELECT should return same set of rows wether in INSERT, CREATE TABLE AS or a simple SELECT.
    DB version is 10.2.0.2.
    Here is the SQL:
    INSERT INTO TMP_TRADING_PROM_BM_OSTALO
    select
    5 AS VRSTA_PLANIRANJA_KLJUC, u1.UNOS_KLJUC, t1.TRADING_TIP_KLJUC, i1.IZVOR_KLJUC, m1.ITEMNAME AS MJESEC,
    l1.PLAN AS IZNOS, l1.TEKUA AS TEKUCA, l1.PROLA AS PROSLA, l1.PLANTEKUA_ AS IZNOS_TEKUCA, l1.PLANPROLA_ AS IZNOS_PROSLA, l1.TEKUAPROLA_ AS TEKUCA_PROSLA, l1.DATUM_UCITAVANJA
    from
    HR_SP_PLAN.L_12_ET_PROMETI_I_BRUTO_MARZA l1,
    select
    m1.ITEMIID, m1.ITEMNAME
    from
    HR_SP_PLAN.L_12_IT_4_MJESECI m1
    where
    UPPER (m1.ITEMNAME) NOT LIKE '%KVARTAL%' AND UPPER (m1.ITEMNAME) NOT LIKE '%GODINA%' AND UPPER (m1.ITEMNAME) NOT LIKE '%PROC%' and
    m1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy')
    union all
    select -99, null from dual
    ) m1,
    HR_SP_PLAN.L_12_IT_5_SEKTORI l2,
    HR_SP_PLAN.L_12_IT_2_TIPOVI_OSTALO l3, HR_SP_PLAN.D_UNOS u1, HR_SP_PLAN.D_TRADING_TIP t1, HR_SP_PLAN.L_12_IT_1_PROMET_I_BM_OSTALO p1, HR_SP_PLAN.D_IZVOR i1
    where
    l1.ELIST = l2.ITEMIID and
    l2.ITEMNAME = u1.UNOS_NAZIV and u1.USER_KLJUC = 12 and l2.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DIMENSION_1_PROMET = p1.ITEMIID and
    p1.ITEMNAME = i1.IZVOR_NAZIV and i1.USER_KLJUC = 12 and p1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    nvl(l1.DIMENSION_4_MJESEC , -99) = m1.ITEMIID and
    l1.DIMENSION_2_TIPOVI = l3.ITEMIID and
    l3.ITEMNAME = t1.TRADING_TIP_NAZIV and l3.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    'PROC' = 'PLAN'
    union all
    select
    4 AS VRSTA_PLANIRANJA_KLJUC, u1.UNOS_KLJUC, t1.TRADING_TIP_KLJUC, i1.IZVOR_KLJUC, m1.ITEMNAME AS MJESEC,
    l1.PROCJENA AS IZNOS, l1.TEKUA AS TEKUCA, l1.PROLA AS PROSLA, l1.PROCJENATEKUA_ AS IZNOS_TEKUCA, l1.PROCJENAPROLA_ AS IZNOS_PROSLA, l1.TEKUAPROLA_ AS TEKUCA_PROSLA, l1.DATUM_UCITAVANJA
    from
    HR_SP_PLAN.L_13_ET_PROMETI_I_BRUTO_MARZA l1,
    select
    m1.ITEMIID, m1.ITEMNAME
    from
    HR_SP_PLAN.L_13_IT_4_MJESECI m1
    where
    UPPER (m1.ITEMNAME) NOT LIKE '%KVARTAL%' AND UPPER (m1.ITEMNAME) NOT LIKE '%GODINA%' AND UPPER (m1.ITEMNAME) NOT LIKE '%PROC%' and
    nvl(ceil(to_number(m1.ITEMNAME)/3), mod(4, 5)) = mod(4, 5) and m1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy')
    union all
    select -99, null from dual
    ) m1,
    HR_SP_PLAN.L_13_IT_5_SEKTORI l2, HR_SP_PLAN.L_13_IT_2_TIPOVI_OSTALO l3,
    HR_SP_PLAN.D_UNOS u1, HR_SP_PLAN.D_TRADING_TIP t1,
    HR_SP_PLAN.L_13_IT_1_PROMET_I_BM_OSTALO p1, HR_SP_PLAN.D_IZVOR i1
    where
    l1.ELIST = l2.ITEMIID and
    l2.ITEMNAME = u1.UNOS_NAZIV and u1.USER_KLJUC = 13 and l2.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DIMENSION_1_PROMET = p1.ITEMIID and
    p1.ITEMNAME = i1.IZVOR_NAZIV and i1.USER_KLJUC = 13 and p1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    nvl(l1.DIMENSION_4_MJESEC , -99) = m1.ITEMIID and
    l1.DIMENSION_2_TIPOVI = l3.ITEMIID and
    l3.ITEMNAME = t1.TRADING_TIP_NAZIV and l3.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    l1.DATUM_UCITAVANJA = to_date('24.11.2008','dd.mm.yyyy') and
    'PROC' = 'PROC';

  • Cursor problem - intermittent selecting and moving cursor left and up

    Hi there. I have an intermittent problem. It doesn't happen all the time. It seems to happen when my mac has been on for say longer than half an hour. When I use either the trackpad or mighty mouse to select something, say a folder which has 10 files in it. If I click on the file at the bottom, it automatically selects the files above it and to the left. Its like someone is pressing the move left arrow and move up arrow on the keyboard. It also happens say if I wish to type in an url in safari, the cursor constantly moves left and all these problems make it useless to use. It doesn't happen all the time. I have checked the battery and it seems normal looking, and I have reinstalled osx but it still happens. Would the arrow keys on the keyboard be stuffed or trackpad?

    Hi there. This is already ticked, and I have tried it ticked and unticked, so that doesn't fix the problem, but thanks for trying. I actually left it with a mac repair man and he looked at it all weekend, but the problem didn't display for him, so thats frustrating! I need to try something else.

  • Iphone 5S iphoto crashing when trying to select and create folders on IOS 8.0.2

    The iPhoto app keeps crashing when I try to make a new folder.  Don't get me started on the "recently added" tab.  I cannot access my entire library anymore through apps because they can't find my entire library.  They can only see the recently added tab and any other custom tab made.  Therefore I need to create and move all of my photos to another custom tab. But, the app crashes every time I try.  Any input would be appreciated!

    Hello Nosewitdot,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning device issues:
    Turn your iOS device off and on (restart) and reset
    How to restart
    Press and hold the Sleep/Wake button on the top of your device until the red slider appears. Then drag the slider to turn your device completely off.
    After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
    How to reset
    You should reset your device as a last resort and only if you can't restart it.
    To reset, press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo.
    Get more help
    See what to do if your device still doesn't respond or doesn't turn on.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • How to loop through dates and return a list of dates?

    hi,
    thank you all for your help my all my oracle endaevors so far:)
    I was going through PL/SQL Programming book by Oracle Press, but overall wasnt able to find the answer for the following.
    I have a list of shops, simple: shop_name (table), date_holiday (table) that lets me keep dates that certain shop is closed.
    example: shopID = 10
    shopID 10
    date_holiday 12/31/2009
    shopID 10
    date_holiday 1/1/2009
    now, what I am trying to achieve is I am trying to get the list of days (formatted as MM/DD/YYYY, but thats not biggy) starting today and ending up in 3 months from now that will EXCLUDE all the holidays, example
    select date_open ...... where shopID = 10;
    [starting today]
    12/29/2009
    12/30/2009
    1/2/2010
    1/3/2010
    [ending 3 months from today]
    any simple ways or ideas that may help?
    thank you!

    somehow like this
    select :the_shop shopid,the_day date_open
      from (select the_day,date_holiday
              from (select trunc(sysdate) + level the_day
                      from dual
                    connect by level <= add_months(trunc(sysdate),3) - trunc(sysdate)
                   ) d,
                   (select date_holiday
                      from holday_table
                     where shopid = :the_shop
                   ) h
             where the_date = date_holiday(+)
           (select nvl2(location_open1,'open,','mon,')||
                   nvl2(location_open2,'open,','tue,')||
                   nvl2(location_open3,'open,','wed,')||
                   nvl2(location_open4,'open,','thu,')||
                   nvl2(location_open5,'open,','fri,')||
                   nvl2(location_open6,'open,','sat,')||
                   nvl2(location_open7,'open,','sun') location_not_open
              from locations
             where locationid = (select shopid
                                   from shops
                                  where shopid = :the_shop
    where instr(location_not_open,to_char(the_day,'dy')) = 0
        or date_holiday is nullRegards
    Etbin

  • Loop through header and item internal table

    Hi,
        My scenario will be like this, i have two internal tables which is populated based on certain conditions, now i have to call one bapi to update values that am going to store values in a tree structure say for eg mat01 is header and mat02 and mat03 are item values.
          What is the efficient method to call that bapi one time for header creation and consequte times for item creation respectively.
      shall i have to loop thro two internal tables i.e header and item?
    suggestions are welcomed from the experts...
    Thanks in advance...
    Regards,
    Babu

    Hi Babu
    you can do something like that.
    loop it_header.
    *Call bapi to create header
      loop it_item where field_key = it_header-field_key.
    *  Call bapi to create item  
      endloop.
    endloop.
    The important part is the where sentence in the second loop.
    Regards
          David N.

Maybe you are looking for

  • Control message "Purchase across Company codes is not allowed"

    Hello Gurus We are running SRM5.0 ECS using EP. If we attempt to create a SC that falls foul of the above validation, we get a message but only as a warning. Naturally if a warning, users will ignore and continue the purchasing process up to the poin

  • Lc config document

    Hi     wat is lc i.e., letter of credit;provide step by step configuration Thanks in advance Arpitha

  • Attaching pictures to email.

    Hi, I sent some pictures by email yesterday and it work fine, the format was perfect. But today, when i went to attach pictures to a hotmail email, it took ages and the format was way too big. The only thing i can think of that could of created this

  • Problem during Message Splitting

    Hi, My requirement is to split by Senders Message.. During Mapping i have changed the occurenec of my ZRFC to 0..unbounded.. Mapping i slike Message->                             Message->     Message1->                        Message1->         MT_A

  • H.P. non existent customer service.

    What an utter shambles Hewlett Packard is. Take your money and thats it. I cannot even find my query on this site and if it is there donot expect an answer any way. Fancy having to go on a site like this to get any service at all. This from a multimi