Is it possible to make repeat / do while /loop in simple SQL

Dear Expert,
If I would like to have the substract manipulation (column1 - column2) and repeat the calcuation in SQL using select statement while pulling data from table, is it possible?
Tks, Emily

Dear Gordon,
For example, as of today, the current stock is 200 and total ordered qty is 2000
How could I have the report to automatically calculate the "Qty short"?
PN#          Pro. date   Req. Qty     Stock       Qty ordered      Qty short
KC001       4/1/10         100            200               2000             (200-100) --> enough stock
KC001       5/15/10       400            200               2000             previous line answer (200-100) - 400  --> short so should pull in
KC001       5/30/10       300            200               2000             continue to calculate
KC002
Tks a lot, Emily

Similar Messages

  • Is it possible to make connection for the VC application the SQL Server

    hi
    I have requirement like, We have some data available in SQL server as central repositoty. My client want to make the Anylatics application like showing graphs in VC based on the data available in SQL server.
    My question. Is there any possiblity to make the connection the sql server by creating some system object using some JDBC connection Like that.
    What is the possibility.
    can u any body tell what is the work around need to be for this requirement. Whether it is possible or not.
    Regards
    vijay

    Hi Vijay,
    In your other thread, I have given the link to the following doc which will help you to in configuring the JDBC Connector.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/b00917dc-ead4-2910-3ebb-b0a63e49ef10
    That was the first step.
    In the second step, you need to create a JDBC System in the portal. Go through the following doc which explains how to create BI JDBC system for VC. All you need to change is that on Page 10, choose JDBC system instead of BI JDBC system, and do the necessary configurations.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
    As rightly said by Marcel, you can use stored procedures as well as SQL statements. As far as stored procedures are concerned, all you need to do is go to Enterprise Manager, and create procedures in your database in the same way by which you create new tables and users (Refer my article). Then you can use these procedures in your Visual Composer provided you have properly created the JDBC system in portal properly.
    Also have a look at the following doc:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6339e7d4-0a01-0010-1c98-db00e52e989a
    Bye
    Ankur
    Do reward points for helpful as well as solved answers!!

  • Is it possible to make horizontal videos while holding phone vertical?

    I wonder if it was possible to always shoot videos horizontal?
    I find it is easier to hold a phone vertical while filming but the video material ***** when it is vertical.
    The best example is when you film yourself with the front camera. You hold the phone vertical but what you get in the end is some silly, ugly vertical video.

    It is not possible unless you download a app but if you shot the video horizontal and then you can play it while hold the phone vertical

  • My First while loop inside PL/SQL block not working , please help

    Hi ,
    I am new to PL/sql and struck at PL SQL blocks , please help to solve this .
    declare
    v_A number constant :=10 ;
    j number constant := 3 ;
    BEGIN
    WHILE j < v_A
    LOOP
    DBMS_OUTPUT.PUT_LINE('Hai');
    END LOOP;
    END;
    please help as how to resolve this .
    Thanks in advance .

    btw it's a useful habit to use indentation to highlight the block structure. Also it's worth deciding what your convention will be for keywords (I use uppercase, lowercase is also fine as far as I'm concerned but I've set up my editor to uppercase them) and variables, database object names etc (I use lowercase), e.g:
    DECLARE
       v_a CONSTANT PLS_INTEGER := 10;
       j   CONSTANT PLS_INTEGER := 3;
       i PLS_INTEGER := j;
    BEGIN
       WHILE i <= v_a LOOP
          DBMS_OUTPUT.PUT_LINE(i);
          i := i +1;
       END LOOP;
    END;or perhapsdeclare
       v_a constant pls_integer := 10;
       j   constant pls_integer := 3;
       i pls_integer := j;
    begin
       while i <= v_a loop
          dbms_output.put_line(i);
          i := i +1;
       end loop;
    end;When I see "declare" and "BEGIN" in the same block of code I worry about the standard of code I'm going to see...

  • How do I make one while loop that runs 1 piece of data at a time?

    I have a question about a while loop.  Currently, I have 4 or 5 dynamic data lines that I would like to run through a while loop that will tell me if the data is within a certain range or not.  However, the ranges are different for each piece of data, and I dont know how to do each one separately.  Do I have to make 5 different while loops? Thanks!

    pg22aw wrote:
    I have a question about a while loop.  Currently, I have 4 or 5 dynamic data lines that I would like to run through a while loop that will tell me if the data is within a certain range or not.  However, the ranges are different for each piece of data, and I dont know how to do each one separately.  Do I have to make 5 different while loops? Thanks!
    Do you want to compare the value with a defined value and also the ranges for the 5 data is different?. What are you doing in the while loop. If the data is in an array of dynamic data you can seperate the amplitude value and check the whole array of value with the ranges that is also build same as the data theh you will get the output as a boolean array.
    The best solution is the one you find it by yourself

  • I wonder if I can get the lyrics (lyrics) are scrolled on the screen, as most lyrics is very large, and can almost never get the entire text box. is possible to make each verse appears, while the audio playback?

    I wonder if I can get the lyrics (lyrics) are scrolled on the screen, as most lyrics is very large, and can almost never get the entire text box. is possible to make each verse appears, while the audio playback? please help me???

    Just connect the new iPod to your computer and setup the iPod via iTunes (instead of via wifi).
    If you want to copy all the infor from an old iPod touch to the inew iPod see:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • How can I make a while loop wait 10 seconds before iterations​?

    I am using labview to for an osmosis system that measures the amout of water lost from the reading on a scale.  
    I currently have the program displaying the data from 3 scales every second.
    I also need to calculate the flux through the membrane over time.
    I do this with a function that takes a change in the scale reading over time (with a shift register) followed by a series of mathematical conversions.
    The readings from the scale display OK every second, but I need to have at least 10 seconds between flux calculations.
    So my question is, how do I make a the shift register take one value from the scale, then wait 10 seconds before taking the second value?  That way I have the mass of water lost over a 10 msecond period.  
    Below is my current while loop for Flux using shift registers from data from 3 scales.  
    Any helkp would be great!
    Also, I'm new at LabVIEW...

    Bob_Schor wrote:
    Do you understand how Dataflow (a key idea behind LabVIEW) works?  If you put a Wait (ms) function (on the Timing Palette) with 10000 (10,000 milliseconds = 10 seconds) inside your While Loop, the principles of Data Flow will require all of the functions inside the While (specifically the Wait function) to finish their execution before the loop can run again.  As everything else in the loop takes approximately 0 seconds, this will make your loop run once every 10 seconds.
    Bob Schor
    I do not think that is a good idea. 
    The inner loop should be in sync with the outer loop, not run independent on it's own timer.
    If the inner loop is running independently you run the risk of using stale data.
    Actually  altenbach is right the inner loop does not need to be a for loop at all, but rather just a case like my suggestion (without the for loop) and the shift registers should be out on the main loop.
    My suggestion was a quick solution going by what little bit of the block diagram I could see, but if the entire code was posted I am sure we would see where more improvements could be made and possibly even a better solution.

  • Is it possible to make an iWeb site accessible to mobile phones? (in Japan)

    Is it possible to make an iWeb site accessible to mobile phones? (I'm in Japan)
    I've tried making a tiny site but my own phone (au A5516T by Toshiba) can't display it.
    The URL is accepted but displays just a white blank screen.
    I can't see anything about it in this iWeb forum or iWeb Help. Which I guess means that either it's impossible or that it's so elementary I shouldn't have to ask!
    Is there some special code involved?
    Any hints much appreciated. Thanks.
    Simon

    Try these articles: Put Your Content in My Pocket -- "While these articles are specifically targeted at the iPhone, many of the ideas and concepts I’m presenting can be useful and effective with other mobile devices."...
    http://alistapart.com/articles/putyourcontentinmypocket
    http://www.alistapart.com/articles/putyourcontentinmypocketpart2/
    By the way, you can read that "Apple Meets With DoCoMo, Softbank On Launching iPhone in Japan" here:

  • Is it possible to make MIRO against multiple documents???

    Dear experts ,
    Is it possible to make an invoice verification against multiple delivery notes / or multiple POs??
    Pls let ma  know
    Thanks & regards
    Anis

    HI,
    It is possible with Multiple allocation criteria in MIRO, but be sure multiple documents should possess the same vendor in the Purchase orders.
    Also it is really not advisable as because after posting if you found or want to rectify an error wrt to a single PO you need to cancel the Invoice document which will result in cancelling the document for the entire PO's listed and after correction you need to repeat the process again which will be a real cumbersome process.
    Regards,

  • Is it possible to make a text box cycle/rotate through text, like a slide show does?

    Is it possible to make a text box cycle through 3 or 4 separate pieces/groups of text, like a slide show does with photos? So that when I open my site a text area says "Statement 1", then 10 seconds later it changes to "Statement 2", then 10 seconds later it chagnes to "Statement 3", etc.
    Its that possible with a text box? My desire is to have 3 or 4 testimonials that change every 10 seconds.
    You can see that right now it's a single testimonial:
    www.kmlstudio.com
    All help is appreciated
    Thanks!
    Kevin

    Right.  Some plugins have zip file downloads while others are just copy & paste.
    In DW, go to File > New > Blank page > JavaScript.
    Copy & paste the Cycle plugin code into your new JS page. 
    SaveAs   cycle.2.9.81.js  in whichever site folder you normally keep scripts.
    Link your HTML page to your new cycle script:
    Insert > Script > Script (browse to folder containing your cycle script). Hit OK.
    Don't forget to add a link to the jQuery core library, too.  Plugins don't work without it.
    Nancy O.

  • The reporting point backflush is not possible for make-to-stock repetitive

    Hi All,
    we are using the assembly backflush in the MTS REM process. we are need to do the reporting point backflush
    if we tick against the RP backflush. what will be the effect in the process while confirmation.
    i read the sap library . it say like
    The reporting point backflush is not possible for make-to-stock repetitive manufacturing.
    is it correct.
    Thanks
    VRaj

    Hi mangal,
    i did all the setting as you said. but when click on the reporting point.
    system thru error
    Error reading reporting point information
    Message no. RM111
    Diagnosis
    The repetitive manufacturing profile is set for the reporting point procedure. However, either no reporting points exist for the material or they are incorrect. Two common reasons for this are:
    The repetitive manufacturing profile has been changed in the current session.
    You have not defined any milestone operations in the routing.
    When creating the product cost collector, no reporting points were created.
    Procedure
    Two alternative solutions are possible:
    Assign a repetitive manufacturing profile with no reporting point procedure to the material in the material master record.
    Recreate the reporting points by recosting the product cost collector. To do this, the following prerequisites must be met:
    In the material master record, in the production version, you must enter a routing under either detailed planning (first priority) or under rate-based planning (second priority).
    Milestone operations must exist in this routing. The system ususally automatically creates the reporting points from these milestones when creating a product cost collector or when creating a production version.
    how to create the REPORTING POINT

  • Is it possible to make a .MOV file "un-downloadable"

    Hi there...
    I have a weird question - is it possible to make an online video (.MOV file) "un-downloadable"?
    I work at a college and a professor wants to post some videos within the school's public site. But, because of his concern with copyright, he wants to make it so the videos are impossible to download to the viewers' local machines.
    Is there any type of setting or code that can be put within the .MOV file that would allow this to happen?
    Thank you so much for any feedback you have!
    g4   Mac OS X (10.4.8)  

    Any browser viewed QuickTime file will be "cached" (stored on the viewing computer). This is how browser work (they keep a copy of every page element) to help speed up viewing.
    QuickTime 7 (Mac and PC version) even allows the user to set the size of this cache so movies can be viewed while "off line".
    True "streaming media" (served with special streaming server software) is not cached on the viewing machine so no local copy is made. Streaming Server (QTSS) is free software available from Apple.
    What your school probably really wants is a way to prevent "copies" of your files being used. This is nearly impossible as anyone that views the file could use screen capture software to get a copy. Even the true streaming version.
    I use Snapz Pro.
    You could use some type of "log on" Web page to help limit the audience.
    You could also use "skin track" movies which make screen capture a bit of a chore.
    http://homepage.mac.com/kkirkster/MTV/
    My example will open in QuickTime Player. Even Pro users are prevented from saving or editing the file because it is protected by an AppleScript droplet "Save As Un-Editable" and modified for Tiger and QT 7.
    Hope this helps you decide a plan.

  • Is it possible to make a modal window resizable?

    Is it possible to make a modal window resizable?
    I am not sure that I have the best way to create modal windows in the first place.
    I have a TitleWindow which is hidden, and when I want to display it I make it visible and add it to thePopUpManager.
    For example here I have an "importing" window which is visible while the application imports some stuff:
        <mx:TitleWindow id="importingWindow" title="Importing Frame"
            layout="absolute" styleName="Blue"
            creationPolicy="all" visible="false"
            width="350" height="150"
            modalTransparency="0.3" modalTransparencyBlur="1" modalTransparencyColor="0x999999"
            modalTransparencyDuration="50">
                <mx:Label tabIndex="0" text="Importing... please wait!" left="55" top="45"/>
        </mx:TitleWindow>
                private function showImportingWindow():void
                    importingWindow.visible=true;
                     PopUpManager.addPopUp( importingWindow, this, true );
                    PopUpManager.centerPopUp( importingWindow );
                private function hideImportingWindow():void
                    PopUpManager.removePopUp( importingWindow );
                    importingWindow.visible = false;
    How would it be possible for this window to be resizable?
    If not through the TitleWindow, is there any other way to have a resizable window within the application? (i know the application window can be resizable, but what about windows within the application?)

    Yes, but not as easily as you can make a normal window resizeable (AFAIK).  You would need to handle it all yourself by adding a resize area with listeners, etc.

  • Is it possible to make a move in contouring mode with onboard program

    I use Labview 7.1.
    I have a motion board 7344.
    Is it possible to make a move in contouring mode (as in the attached vi) with onboard program and how do that?
    Attachments:
    Onboard_program.vi ‏79 KB

    It's not possible to use the contouring mode in an onboard program like you did it in your example. The reason is that while the program is downloaded the write buffer.flx is NOT executed. Thus it can't download the buffer data stored in your front panel arrays. When you start the onboard program later it doesn't have access to your buffer data on the front panel.
    In fact I don't see a real advantage why you would like to run the write buffer.flx in an onboard program. You could configure and download the buffer on the host and then use it in an onboard program.
    Best regards,
    Jochen Klier
    NI-Germany

  • I bought an iPhone 5 in Brazil, but i dropped it in the floor and now i need to fix it. is it possible to make in New York and how much would cost?

    i bought an iPhone 5 in Brazil, but i dropped it in the floor and now i need to fix it. is it possible to make in New York and how much would cost?

    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5s. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task. Start with Google to search for these.

Maybe you are looking for

  • Vcf cards have no content

    When trying to send by mac mail someone a vcf card, they receive it with no content.  When I try to send to my own yahoo or gmail account, I fint the same problem.  Help!

  • Help! Why didn't my Mail emails update from Lion?

    I'm having an issue with my Mail app after upgrading from Lion.  My start up drive is a 120GB SSD and it doesn't have enough space to store my 16+GB mail file or my iPhoto library. Under Lion, I had the Mail folder on an external drive and had an ali

  • Crashing after Log and Transfer

    I am experiencing a FCP crash after using Log and Transfer to import P2 files.  The material is on an external FW800 drive.  I go to Add Custom Path in the Log and Transfer dialog box, point the software to the CONTENTS folder of each captured P2 car

  • Adobe Photoshop Elements v. 8.0

    Error 1935. An error occured during the installation of assembly component {74FD3CE6-28AD-0E96-A01F-C8B3B9A1E18A} HRESULT:0X80073712. I get this error, but I can run the program after the error occurs. It seems to install, but when I get the error co

  • What is the Service ID to Create ILibraryService?

    Hi haikun .. May I know which ServiceID should I pass in the serviceRegistry->QueryDefaultServiceProvider(ServiceID serviceID, ClassID providerClassID) method inorder to create ILibraryService Interface?? thanks, nataraj