Update Next Shift opeing balance with current shift closing balance

hi,
 I have an aggregation table which have shiftwise, productwise, warehouse wise stock data. i want update the next shift opening balance with current  shift closing balance.
My table is
ID          ShiftDate         ShiftNumber   ProductID   OpeningBalance  Inward  Outward  ClosingBalance WarehouseID
1             2014-07-02         1                  1                  
0                   50           20                
30                1
2             2014-07-02          2                 1                  
50                   0              0                
50               1 
Actually my aggregation is already run and update the table like above. But after that user done a transaction and accounted in the first shift. So i need to reupdate the data after the accountshift. I update the outward and closing balance so the closing
balance of first shift is correct.
Now i want update opening balance of second shift needs to be updated based on the corresponding closing balance of the shift 1.
Please guide me for this. I can pass ShiftData and ShiftNumber as '2014-07-02' and 1 respectively.

Which is sql server version you'e using? If its sql 2012, you can use PARTITION BY with RANGE BETWEEN for this. 
Otherwise you need to use a correlated subquery logic using APPLY
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Adobe Publishing Suite update v24 is not compatible with current Adobe Content Viewer

    I updated the Adobe Publishing Suite to  v24 and updated my folio to v24. Now I can't view it in Adobe Content Viewer. When will the Adobe Content Viewer be updated to be compatible with the new v24?

    Sjekk out this post:
    http://forums.adobe.com/message/4830471#4830471

  • Just tried to update my iPad 2 to the current iOS, and I got an error that said the update wouldn't install. The iPad is stuck in a funny mode with the apple and spinning wheel showing. I can't power it down or restart it. What next? Thanks.

    Just tried to update my iPad 2 to the current iOS, and I got an error that said the update wouldn't install. The iPad is stuck in a funny mode with the apple and spinning wheel showing. I can't power it down or restart it. What next? Thanks.

    Try a hard reset: hold the power and home buttons simultaneously until the Apple logo appears.

  • What is 'No marker update'? do opening balance have any relation with it?

    what is 'No marker update'? do opening balance have any relation with it? i know that 'No marker update' will not update reference point that means it will not change the opening balance date to current data, is it right? please explain.
    York

    Hi
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20handle%20inventory%20management%20scenarios.pdf
    When you load historic non cummulatives you need to set the "No Marker Updating" indicator if initalization has already taken place otherwise your data will not match with the stock on R/3 side.
    Raja

  • Shift timing error(Shift finish 07:00:00 is after start of next shift 07:00

    Hello ,
    I have defined shift timings as follows , S1 23:00 to 7:00, S2 7:00  to 15:00 and S3 15:00 to 23:00.
    Assigned them in shift sequence. When i try to assign it to capacity of the work centre it gives error "Shift finish 07:00:00 is after start of next shift 07:00:00".
    Request you to share your thoughts on this problem .
    Thanks & Regards
    Abhijit S Nakhwa

    Dear,
    Is this error or warnning message?
    Please check this in OP4A
    HWS1     First     01.01.2009     31.12.9999     23:00:00     07:00:00     8.00     
    HWS2     Second     01.01.2009     31.12.9999     07:00:00     15:00:00     8.00     
    HWS3     Third     01.01.2009     31.12.9999     15:00:00     23:00:00     8.00
    Shift sequence,
    HWP1     1                              HWS1     HWS1     HWS1
    HWP1     2                              HWS2     HWS2     HWS2
    HWP1     3                              HWS3     HWS3     HWS3
    Then assign it work center with valid date and press enter.
    Regards,
    R.Brahmankar

  • I am working on a MacBook Pro (13-inch, Mid 2009) with boot camp running Windows 7 pro 64-bit.  Windows crashes quite often now-a-days and I need to get this fixed. I heard that updating boot camp can help.  Currently I am running Version 3.0.4 (322).

    I need to know which update(s) I can apply to help stabalize the system.

    Typing the body of the thread message in the title, huh? -)
    I am working on a MacBook Pro (13-inch, Mid 2009) with boot camp running Windows 7 pro 64-bit.  Windows crashes quite often now-a-days and I need to get this fixed. I heard that updating boot camp can help.  Currently I am running Version 3.0.4 (322).
    Only Apple could hamstring and tie Mac OS to Windows. There isn't any other than whether you can download the drivers into Windows (you can) but Apple puts a block on the installer setup even if your mac does not support it.
    Windows 7 needs at least Boot Camp 3.1 and 3.3 is what you should already have. And you are not getting security updates if you don't have at least 10.6.8 as was pointed out.  --- you arent using Software Update as you should. And you should backup and clone Mac (and Windows) as well.
    You need Mountain Lion to use Boot Camp 5.x which supports Windows 7 & 8 and 64-bit.
    I would upgrade to Lion if you can realizing that Rosetta and PowerPC are no longer supported though.
    Mac 101: Using Windows on your Mac via Boot Camp
    https://support.apple.com/kb/HT1461
    http://www.apple.com/support/bootcamp/
    Helpful Apple Support Resources (Forum Overview)
    Boot Camp Support 
    Boot Camp Manuals
    Boot Camp 5.0 Drivers
    http://support.apple.com/kb/DL1638
    Frequently asked question
    http://support.apple.com/kb/HT4818
    http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.7.pdf
    http://manuals.info.apple.com/en/Boot_Camp_Install-Setup_10.6.pdf
    http://manuals.info.apple.com/en/Boot_Camp_Install-Setup_10.6.pdfcreate a Windows support software (drivers) CD or USB storage media
    http://support.apple.com/kb/HT4407
    The Boot Camp Assistant can burn Boot Camp software (drivers) to a DVD or copy it to a USB storage device, such as a flash drive or hard drive. These are the only media you can use to install Boot Camp software.
    https://support.apple.com/kb/HT4569
    http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.8.pdf
    Instructions for all features and settings.
    Boot Camp 4.0 FAQ Get answers to commonly asked Boot Camp questions.
    Windows 7 FAQ Answers to commonly asked Windows 7 questions.
    http://www.apple.com/support/bootcamp/
    Is there a download of the Boot Camp 5 Support Software if I'm not using OS X Mountain Lion v10.8.3?
    Yes, you can download the Boot Camp 5 Support Software here.
    http://support.apple.com/kb/DL1638
    How do I use the Boot Camp 5 Support Software I downloaded from the web page?
    The download file is a .zip file. Double click it to uncompress it.
    Double-click the Boot Camp disk image.
    Copy the Boot Camp and "$WinPEDriver$" folders to the root level of a USB flash drive or hard drive that is formatted with the FAT file system (see question below for steps on how to format).
    Install Windows, leaving the flash or hard drive attached to the USB port of your Mac.
    Installation of the drivers can take a few minutes. Don't interrupt the installation process. A completion dialog box will appear when everything is installed. Click Finish when the dialog appears.
    When your system restarts your Windows 8 installation is done.
    Note: If the flash drive or hard drive was not attached when you installed Windows and was inserted after restarting into Windows 8, double-click the Boot Camp folder, then locate and double click the "setup.exe" file to start the installation of the Boot Camp 5 Support Software.
    How do I format USB media to the FAT file system?
    Use Disk Utility to format a disk to use with a Windows computer. Here's how:
    Important: Formatting a disk erases all the files on it. Copy any files you want to save to another disk before formatting the disk.
    Open Disk Utility.
    Select the disk you want to format for use with Windows computers.
    Click Erase, and choose one of the following from the Format pop-up menu:
    If the size of the disk is 32 GB or less, choose MS-DOS (FAT).
    If the size of the disk is over 32 GB, choose ExFAT.
    Type a name for the disk. The maximum length is 11 characters.
    Click the Erase button and then click Erase again.
    Which versions of Windows are supported with Boot Camp 5?
    64-bit versions of Windows 8 and Windows 7 are supported using the Boot Camp 5 Support Software. If you need to use a 32-bit version, you need to use Boot Camp 4 Support Software, and you must use Windows 7. 32-bit versions of Windows 8 are not supported via Boot Camp. For a complete list of Windows OS support, click here.

  • I am trying to update my iPod touch and I want to sync my music, but it keeps saying that if I update then it will erase my current media and sync with my new one which has no songs in it, please help

    I am trying to update my iPod touch and I want to sync my music, but it keeps saying that if I update then it will erase my current media and sync with my new one which has no songs in it, please help

    Follow these instructions. When you restore the iPod as the articles say the iPod will also be updated.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    Sync Your iOS Device with a New Computer Without Losing Data - How-To Geek
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Start Time constantly updates with current time

    Hi,
    Start Time of the web service constantly updates with current time.
    Is there anyone who had the same problem?
    Thanks for your help,
    Julien

    Hi MrHoffman,
    Thanks for your reply.
    I've been messing a bit in the apache config files indeed, though it's supposed to be pretty clean: filemaker.
    Configtest reports SYNTAX OK and I can't see anything exceptionnal in the console.app log files :-/
    The only thing I see in my logs is:
    7/28/09 7:30:09 PM org.apache.httpd[22921] Redirect takes two or three arguments, an optional status, then document to be redirected and destination URL
    7/28/09 7:30:09 PM com.apple.launchd[1] (org.apache.httpd[22921]) Exited with exit code: 1
    7/28/09 7:30:09 PM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds
    7/28/09 7:30:19 PM org.apache.httpd[22929] Syntax error on line 45 of /etc/apache2/sites/0000any_80www.cap.be.conf:
    7/28/09 7:30:19 PM org.apache.httpd[22929] Redirect takes two or three arguments, an optional status, then document to be redirected and destination URL
    7/28/09 7:30:19 PM com.apple.launchd[1] (org.apache.httpd[22929]) Exited with exit code: 1
    7/28/09 7:30:19 PM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds
    7/28/09 7:30:29 PM org.apache.httpd[22933] Syntax error on line 45 of /etc/apache2/sites/0000any_80www.cap.be.conf:
    7/28/09 7:30:29 PM org.apache.httpd[22933] Redirect takes two or three arguments, an optional status, then document to be redirected and destination URL
    7/28/09 7:30:29 PM com.apple.launchd[1] (org.apache.httpd[22933]) Exited with exit code: 1
    7/28/09 7:30:29 PM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds
    7/28/09 7:30:39 PM org.apache.httpd[22934] Syntax error on line 45 of /etc/apache2/sites/0000any_80www.cap.be.conf:
    7/28/09 7:30:39 PM org.apache.httpd[22934] Redirect takes two or three arguments, an optional status, then document to be redirected and destination URL
    7/28/09 7:30:39 PM com.apple.launchd[1] (org.apache.httpd[22934]) Exited with exit code: 1
    7/28/09 7:30:39 PM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds
    7/28/09 8:00:41 PM com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight
    7/28/09 8:21:49 PM com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight
    7/28/09 8:38:39 PM com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight
    7/28/09 9:11:51 PM com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight
    7/29/09 1:02:47 PM com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight
    Thanks again,
    Julien

  • I have OSX 10.5.8 how do i update that so i can sync with current apple products?

    i have OSX 10.5.8. How do i update that so i can sync with current apple products?

    Upgrade Paths to Snow Leopard, Lion, and/or Mountain Lion
    You can upgrade to Mountain Lion from Lion or directly from Snow Leopard. Mountain Lion can be downloaded from the Mac App Store for $19.99. To access the App Store you must have Snow Leopard 10.6.6 or later installed.
    Upgrading to Snow Leopard
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mountain Lion if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s iCloud services; fees and
               terms apply.
    Upgrading to Lion
    If your computer does not meet the requirements to install Mountain Lion, it may still meet the requirements to install Lion.
    You can purchase Lion by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.
    Upgrading to Mountain Lion
    To upgrade to Mountain Lion you must have Snow Leopard 10.6.8 or Lion installed. Purchase and download Mountain Lion from the App Store. Sign in using your Apple ID. Mountain Lion is $19.99 plus tax. The file is quite large, over 4 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.
         OS X Mountain Lion - System Requirements
           Macs that can be upgraded to OS X Mountain Lion
             1. iMac (Mid 2007 or newer) - Model Identifier 7,1 or later
             2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) - Model Identifier 5,1 or later
             3. MacBook Pro (Mid/Late 2007 or newer) - Model Identifier 3,1 or later
             4. MacBook Air (Late 2008 or newer) - Model Identifier 2,1 or later
             5. Mac mini (Early 2009 or newer) - Model Identifier 3,1 or later
             6. Mac Pro (Early 2008 or newer) - Model Identifier 3,1 or later
             7. Xserve (Early 2009) - Model Identifier 3,1 or later
    To find the model identifier open System Profiler in the Utilities folder. It's displayed in the panel on the right.
    Are my applications compatible?
             See App Compatibility Table - RoaringApps.
         For a complete How-To introduction from Apple see Upgrade to OS X Mountain Lion.

  • Have 2007 macbook with original OS with updates (10.5.8). what most current OS can i upgrade to?

    have 2007 macbook with original OS with updates (10.5.8). what most current OS can i upgrade to?
    Thanks.

    Apple later clarified that you can still order Lion by calling the Apple store at 1-800-MY-APPLE and talking to a person. It was pulled from the Apple.com online store and the App Store.
    http://news.cnet.com/8301-13579_3-57480149-37/apple-quietly-pulls-lion-amid-moun tain-lion-launch/?tag=mncol;editorPicks

  • After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer.

    After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer. The rainbow wheel was runnig 8 hrs and I turn off mac mini by power button, then I turn on mac mini with key Shift and p/w, checked HD. My HD has
    capacity 499.25 GB used 86.91GB. Is there a solution to fix this problem axcept the reinstall os?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.  
    These steps are to be taken while booted in safe mode.
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    for k in /Sy*/L*/Ex*/{,.?}*.kext; do test -f "$k/Contents/Info.plist" && /usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$_" | egrep -qv "apple|Accusys|ArcMSR|ATTO|CalDigit|HighPoint|hp-fax|JMicron|print|SoftRAID|stex" && echo $k; done | open -f -a TextEdit
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    sudo defaults read com.apple.loginwindow LoginHook | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3 
    Repeat with this line:
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 4
    osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null | open -f -a TextEdit 
    Remember, Steps 1-4 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • Insert/updating each customers daily balance

    hi frnds
    I need one help.I having one table contains the transaction summary for customer for every day.Everyday it will update the current balance of customer with current days amount .
    eg if customer 1 having netbalance as of yesterday is 100$ and there is a debit of 20$ and todays netbal is 80$ and adding 100$ on next days his balance will be 180$.I need to capture each days balance of each customer and store in one table to calculate average balance for month and how can i do it.
    eg
    Trans_sum
    cust------tr_dt-------netbal
    C001----06-dec-09----1300$
    C002-----06-dec-09----34000$
    C003-----06-dec-09----2000$
    My requriement
    I need to update each customers transactions separately for each day and need to keep 1 record for 1 month instead of adding 30 or 31 records(full days of month).How to insert each days net balance with date on particular columns.
    Trans_Details
    cust--Month-bal_dt1---bal1----bal_Dt2---bal2---bal_dt3---bal3---bal_dt4---bal4 .......bal_dt31....bal31
    rgds
    radika

    Ok, something like this:
    MERGE INTO your_monthly_trans_balance mtb
    USING (SELECT cust,
                  trunc(tr_date, 'mm') month_dt,
                  max(decode(to_char(tr_dt, 'dd'), '01', value)) day_1,
                  max(decode(to_char(tr_dt, 'dd'), '02', value)) day_2,
                  max(decode(to_char(tr_dt, 'dd'), '03', value)) day_3,
                  max(decode(to_char(tr_dt, 'dd'), '04', value)) day_4,
                  max(decode(to_char(tr_dt, 'dd'), '05', value)) day_5,
                  max(decode(to_char(tr_dt, 'dd'), '06', value)) day_6,
                  max(decode(to_char(tr_dt, 'dd'), '07', value)) day_7,
                  max(decode(to_char(tr_dt, 'dd'), '08', value)) day_8,
                  max(decode(to_char(tr_dt, 'dd'), '09', value)) day_9,
                  max(decode(to_char(tr_dt, 'dd'), '10', value)) day_10,
                  max(decode(to_char(tr_dt, 'dd'), '11', value)) day_11,
                  max(decode(to_char(tr_dt, 'dd'), '12', value)) day_12,
                  max(decode(to_char(tr_dt, 'dd'), '13', value)) day_13,
                  max(decode(to_char(tr_dt, 'dd'), '14', value)) day_14,
                  max(decode(to_char(tr_dt, 'dd'), '15', value)) day_15,
                  max(decode(to_char(tr_dt, 'dd'), '16', value)) day_16,
                  max(decode(to_char(tr_dt, 'dd'), '17', value)) day_17,
                  max(decode(to_char(tr_dt, 'dd'), '18', value)) day_18,
                  max(decode(to_char(tr_dt, 'dd'), '19', value)) day_19,
                  max(decode(to_char(tr_dt, 'dd'), '20', value)) day_20,
                  max(decode(to_char(tr_dt, 'dd'), '21', value)) day_21,
                  max(decode(to_char(tr_dt, 'dd'), '22', value)) day_22,
                  max(decode(to_char(tr_dt, 'dd'), '23', value)) day_23,
                  max(decode(to_char(tr_dt, 'dd'), '24', value)) day_24,
                  max(decode(to_char(tr_dt, 'dd'), '25', value)) day_25,
                  max(decode(to_char(tr_dt, 'dd'), '26', value)) day_26,
                  max(decode(to_char(tr_dt, 'dd'), '27', value)) day_27,
                  max(decode(to_char(tr_dt, 'dd'), '28', value)) day_28,
                  max(decode(to_char(tr_dt, 'dd'), '29', value)) day_29,
                  max(decode(to_char(tr_dt, 'dd'), '30', value)) day_30,
                  max(decode(to_char(tr_dt, 'dd'), '31', value)) day_31,
                  max(avg_monthly_balance) avg_monthly_balance
           FROM   (SELECT ydtb.cust,
                          gen_date.daily_dt tr_date,
                          nvl(value, last_value(value ignore nulls) over (partition by cust, trunc(gen_date.daily_dt, 'mm') order by gen_date.daily_dt)) value,
                          avg(nvl(value, 0)) over (partition by cust, trunc(gen_date.daily_dt, 'mm')) avg_monthly_balance
                   FROM   (SELECT trunc(sysdate, 'mm') + level - 1 daily_dt
                           FROM   dual
                           CONNECT BY level <= to_char(last_day(sysdate), 'dd') + 1) gen_date -- amend this if you need to pass in the month the data is gathered for
                                                                                              -- or gather for more than one months' worth of data
                          LEFT OUTER JOIN your_daily_trans_balance ydtb
                            PARTITION BY ydtb.cust ON (gen_date.daily_dt = ydtb.tr_dt)
                   WHERE  gen_date.daily_dt < trunc(sysdate))        
           WHERE   tr_date = max_date_in_month) dtb
    ON (mtb.cust = dtb.cust and mtb.month_dt = dtb.month_dt)
    WHEN MATCHED THEN
      UPDATE SET mtb.day_1 = dtb.day_1,
                 mtb.day_1 = dtb.day_2,
                 mtb.day_1 = dtb.day_3,
                 mtb.day_1 = dtb.day_4,
                 mtb.day_1 = dtb.day_5,
                 mtb.day_1 = dtb.day_6,
                 mtb.day_1 = dtb.day_7,
                 mtb.day_1 = dtb.day_8,
                 mtb.day_1 = dtb.day_9,
                 mtb.day_1 = dtb.day_10,
                 mtb.day_1 = dtb.day_11,
                 mtb.day_1 = dtb.day_12,
                 mtb.day_1 = dtb.day_13,
                 mtb.day_1 = dtb.day_14,
                 mtb.day_1 = dtb.day_15,
                 mtb.day_1 = dtb.day_16,
                 mtb.day_1 = dtb.day_17,
                 mtb.day_1 = dtb.day_18,
                 mtb.day_1 = dtb.day_19,
                 mtb.day_1 = dtb.day_20,
                 mtb.day_1 = dtb.day_21,
                 mtb.day_1 = dtb.day_22,
                 mtb.day_1 = dtb.day_23,
                 mtb.day_1 = dtb.day_24,
                 mtb.day_1 = dtb.day_25,
                 mtb.day_1 = dtb.day_26,
                 mtb.day_1 = dtb.day_27,
                 mtb.day_1 = dtb.day_28,
                 mtb.day_1 = dtb.day_29,
                 mtb.day_1 = dtb.day_30,
                 mtb.day_1 = dtb.day_31,
                 mtb.avg_balance = dtb.avg_monthly_balance
    WHEN NOT MATCHED THEN
      INSERT (cust,
              month_dt,
              day_1,
              day_2,
              day_3,
              day_4,
              day_5,
              day_6,
              day_7,
              day_8,
              day_9,
              day_10,
              day_11,
              day_12,
              day_13,
              day_14,
              day_15,
              day_16,
              day_17,
              day_18,
              day_19,
              day_20,
              day_21,
              day_22,
              day_23,
              day_24,
              day_25,
              day_26,
              day_27,
              day_28,
              day_29,
              day_30,
              day_31,
              avg_balance)
      VALUES (dtb.cust,
              dtb.month_dt,
              dtb.day_1,
              dtb.day_2,
              dtb.day_3,
              dtb.day_4,
              dtb.day_5,
              dtb.day_6,
              dtb.day_7,
              dtb.day_8,
              dtb.day_9,
              dtb.day_10,
              dtb.day_11,
              dtb.day_12,
              dtb.day_13,
              dtb.day_14,
              dtb.day_15,
              dtb.day_16,
              dtb.day_17,
              dtb.day_18,
              dtb.day_19,
              dtb.day_20,
              dtb.day_21,
              dtb.day_22,
              dtb.day_23,
              dtb.day_24,
              dtb.day_25,
              dtb.day_26,
              dtb.day_27,
              dtb.day_28,
              dtb.day_29,
              dtb.day_30,
              dtb.day_31);NB, I've assumed that a) you have a table that has the daily transaction net balance stored - if you haven't, and you're having to calculate the balance yourself, then you'll need to do a sum(credit_and_debit_cols) grouped by trunc(tr_date) and cust.
    I've also assumed that you're calculating the info for the current month, and may update daily. Ideally, you'd calculate once a month for the previous month, so you would need to amend the dates used to generate the monthly dates in the gen_date subquery. Also, I'm well aware that the last day of the month value will not be updated in the above query, but since you haven't given us details as to when and how often you're running the update, I'm leaving that as an exercise for you if you're going to be updating this month's data each day.
    Also, the above is untested.
    Edited by: Boneist on 07-Dec-2009 12:22

  • Photo shop is not allowing me to use the "Intersect with current selection"

    Photoshop is not allowing me to use the "Itersect with current selection" marquee. (The "UNION" between two selection marquees.) When I press the [Shift] + [Option] keys while dragging on a first selection marquee, this just creates a new selection and removes the old selection. I have also tried using the "intersect with selection" icon which is not working either.

    Lack of experience possibly'.
    To get the 360 degree scroll you need to be 'zoomed in' closer (than 1:1) to a picture or web page so that it is too large to fit on your screen.
    As you know, with Windows you need, at all times' to scroll the bars at the bottom and/or right of the screen to move the display around (a little like an altazimuth telescope is manouvred). Also, if you accidently leave the scroll bar when dragging, the screen immediately snaps back to where you started from rather than knowing how far down you got before your cursor moved off the bar (if it did). You are certain to know what I mean.
    If you are similarly 'zoomed in' to a picture on your new Mac, you don't necessarily need to click and drag on the scroll bars at the bottom (or right) of the window, or use the scroll wheel to move the screen vertically. With your Mac, when zoomed in to a greater than 100%, the mouse allows one toscroll 360 degrees with the mouse - not just vertically. But the picture (or web page needs to be zoomed in somewhat - i.e. greater than 1:1)
    With Web pages in Safari and any other Web Browser (with the possible exception of IE with which I have had no experience with sometime before 2002 and I have only 'heard' that it doesn't work ), if you use the keys 'cmd and '+" together.
    At he end of the day, you just need to keep exploring your new Mac and have fun finfing all the added extras for yourself.
    (There's do many little treasures, it just gettng the time to find them all, in my experience.)

  • Next G models compatible with car kits and antenna...

    Help!
    I currently have a CK-7W car kit with a soon to be obsolete 6235 CDMA handset. I am frustrated by the lack of quality handsets available on Telstra's new Next G service. The current 6120 Nokia only has bluetooth connectivity and no patch lead connectivity to external aerial. Has anyone heard if Nokia will be releasing a Next G model that will have a cradle compatible with the CK-7W car kit or any other hard wired car kit/antennae coupler or patch lead compatibility?

    Make/Model: BMW 325I
    Year: 2006
    Carkit  Model info: Latest firmware for the 3-series.
    Details: Will not connect with bluetooth carkit. Both bluetooth and Pre discover each other but does not connect with each other. The Pre shows that its connected with the car but the car does not connect to the phone.
    webOS: 1.4.0
    Included in compatibilty list: Yes
    It connected and paired up fine before the update to webOS 1.4.0, had no issues with 1.3.5.1. The phonebook functionality also worked fine with the previous version of WebOS

  • How to calculate the number of days until your next birthday. Only using current month, day and birth month and day.

    I'm trying to calculate the number of days until your next birthday. Only using current month, day and birth month and day. I can get close but i'm way off. When i enter in the next day, the amount of days is supposed to be 364. This is where I am having problems. I know my code is way off. I just need some guidance please!
    Attachments:
    D5.7_1.vi ‏8 KB

    I just had a little fun with the Time Record...
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    D5.7_1_BD.png ‏19 KB

Maybe you are looking for