How to Round on Daily bases in a Query.

Hi All,
I have a query which sum the columns between two dates I want to round the sum on the daily bases. My query is written below.
SELECT sum(S_QTY * S_RATE), sum(S_QTY * S_TOT)
FROM SAUDA
WHERE S_PARTY = 'A080' AND S_CITY = 'Z' AND S_TYPE = 'S' AND S_BILL_TYPE = 'd' AND
S_DATE BETWEEN '2005-03-30-00.00.00' AND '2006-03-31-00.00.00' AND UPPER(S_CITY) != 'F';
SUM(S_QTY*S_RATE) SUM(S_QTY*S_TOT)
3700 2.775
What I want is to round the sum on daily bases, means the values which I am getting is the total sum but not the individual dates. Try to help me.
SKM

Try this:
SELECT sum(round(S_QTY) * S_RATE), sum(round(S_QTY) * S_TOT)
FROM SAUDA
WHERE S_PARTY = 'A080' AND S_CITY = 'Z' AND S_TYPE = 'S' AND S_BILL_TYPE = 'd' AND
S_DATE BETWEEN '2005-03-30-00.00.00' AND '2006-03-31-00.00.00' AND UPPER(S_CITY) != 'F';
I hope this will solve ur problem.

Similar Messages

  • How do I stop itunes from corrupting it's library on almost a daily basis?

    How do I stop itunes from corrupting it's library on almost a daily basis?  It's actually becoming infurating to use, and what's happening is I am losing my downloads since the last automated itunes backup (having to rename & replace the current corrupted library with the last backup which is usually a day or two old).  What can cause this?  Is there ANY alternative to using itunes for Apps (which is the sole use I have for it)?   If not, APPLE PLEASE REMOVE THE NEED FOR THE DATABASE SO IT DOESN'T HAVE THE ABILITY TO CORRUPT ITSELF...  :'(

    Things you see in iTunes are stored in various sub folders in your main iTunes folder as in:
    Image of folder structure and explanation of different iTunes versions (turingtest2 post) - https://discussions.apple.com/message/13025536 and https://discussions.apple.com/message/17457605
    Start iTunes and immediately hold down the option key.  Create a new library somewhere.  Go to your old iTunes folder and drag items to the window for the new library.  Maybe only grab a folder or part of one at a time.  It will copy these items to the new library (so you need lots of extra room on your computer).

  • How do I change back to having "bookmark this page" on the top of the list and subordinate "all bookmarks" lower since I use former 100 times more than the later on a daily basis?

    I create about 25 -50 new bookmarks daily for my business. So, it would seem user friendly to put that command at the top of the scroll down list. Maybe I am unique and others want to "show all bookmarks" repeatedly. I can't understand why one would need to do that more often than add multiple bookmarks on a daily basis. i look forward to your response,. Respectfully MC

    cor-el, as you said, that solution puts the "show all bookmarks" all the way at the bottom. How do you either make "bookmark this page" first without changing the order of the other options or force "show all bookmarks" to be second instead of last, the way the menu was before?

  • How to autogenrate multiple items report of the SharePoint list and sent to the client id on daily basis

    Dear Support,
    As per customer requirement he want to send SharePoint list multiple items reports on daily basis by email autognrated workflow in SharePoint.
    I tried for that and created workflow for SharePoint list  on new item creation using SharePoint designer 2013 it’s working fine. But I am unable to send list multiple items report by work flow.
    Please let me know the process for SharePoint list multiple items report generation and how to sent mail to the client id on daily basis.
    Would request your support.

    Hi
    another approach
    use a powershell scheduled script which will get needed lists items, adn will sned the infos by email
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How to sync prod and QA planning app on a daily basis

    Hello All,
    We're planning to schedule planning app backup from production to QA on a daily basis so that we have a fall back option available incase something goes wrong with production. Please let me know what would be the best way of doing that? Or if you have some other simple solution, that would really help! Thank you!
    We're expecting below objects would be updated on a daily basis in production and those need to be brought in to keep QA in sync:
    ---->Planning outline/Essbase outline
    ---->New user security filter creation
    ---->Essbase Data
    The options we've thought:
    ---->Use LCM to automate the backup process (Not sure how to do that, will go through the document)
    ---->Use ODI to automate the backup process
    ---->Schema Copy from production to QA
    Things to note:
    Using system 11.1.1.3
    Simple planning apps with max 2 GB data

    Thank you John for your response. However I have couple more questions, I would really appreciate if you please share your thought on this. Thank you!
    1. When I copy all the tables from production planning app schema to QA, do I have to take care of any specific information like (shared services url registration) in QA?
    Also, every night I copy the schema from Prod to QA, I'll have to copy the entire shared service schema as well. Correct?
    2. I'll definitely explore LCM, but I am not sure if LCM can be scheduled through a third party scheduler or not.
    3. I was going the utility exist in planning applications. Is there any utility which can be used to export the outline, security from production apps and import it back in QA planning apps? That would be nice as we could create the batch files using those utilities and call the batches from third party scheduler.

  • How to increment update B table from A table on a daily basis

    hi ,
    i have two table in two database,
    Table A:
    username
    status
    created
    table B:
    username
    status
    created
    object_count
    I want to insert everything from A to B. for example, on day 1, table A has 100 rows, then 100 rows will be inserted into B. on day 2, table A has 110 rows, then only the 10 new rows will be inserted.
    i want to create a PL sql procedure, and create a shell script in cron job to call this procedure to update table B every day.
    thanks for the help.
    thanks.

    thanks for the reply. i didn't state clear about my task. here is the detail of what exactly I am trying to do.
    table USERACC_FOR_DOM_REP is acting a central repository table which will have all user information from all databases. I have 40+ database. of course , everyday new user will be added.
    SQL> desc audadm.USERACC_FOR_DOM_REP
    Name Null? Type
    USERNAME NOT NULL VARCHAR2(30)
    ACCOUNT_STATUS NOT NULL VARCHAR2(32)
    LOCK_DATE DATE
    EXPIRY_DATE DATE
    CREATED NOT NULL DATE
    PROFILE NOT NULL VARCHAR2(30)
    TARGET_DB VARCHAR2(9)
    TARGET_NODE VARCHAR2(64)
    INSERT_DATE DATE
    OBJECT_COUNT NUMBER
    i can create shell script, loop through each database, and use below SQL to update the USERACC_FOR_DOM_REP table on the daily basis. but the problem is that duplicated entry will be created every day. I only need to insert any new users which added in dba_users table.
    i guess i need a PL SQL procedure to check if a username already exist in table USERACC_FOR_DOM_REP, and that user come from the same database.
    insert into USERACC_FOR_DOM_REP
    select username, account_status, lock_date, expiry_date, a.created, profile,
    name as target_db, host_name as target_node, sysdate as insert_date,
    (select count(*) from dba_objects where OWNER=a.username) as object_count
    from dba_users a, v$database, v$instance;

  • Campaign on Daily Basis

    Hi Experts,
    We have a requirement to send birthday wishes to customers and employees automatically on daily basis using campaign automation.
    We used campaign automation process to send the wishes. when we released the campaign it executed successfully and sent wishes on the same day only(on campaign released date). We used a standard infoset(CRM_MKTTG_BP_BIRTHDATE) to create the profile set.
    Could any one guide us that how do we meet our requirement (to send wishes on daily basis automatically).
    Thanks,
    RAMESH

    I could run Campaign on daily

  • OBIEE 11.1.1.6.12 - save analysis in Excel file into Windows share folder on daily basis

    Hi all,
    how do I save analysis in Excel file into Windows share folder automatically on daily basis? Also my need is to automatically set prompt date in analysis as "sysdate - 1" (yesterday) before saving. Is it possible at all?
    OBIEE 11.1.1.6.12

    Set the report level filter using date
    as current_date-1
    to save file check this OBIEE 11g – Export To The File System : Total Business Intelligence

  • CF 6.1 - JRUN Closed Connection/Server errors occurring on a daily basis

    We seem to be having issues with Jrun Closed Connection/Server errors occuring on a daily basis now. The server will stop responding to requests until the ColdFusion service is restarted.
    We're using CF 6.1, the following error message is from the log files and seems to be Java/JVM related but I was hesitant to make any changes to the JVM parameters.
    Any suggestions on how to resolve this daily issue of restarting CF service? Other than upgrading to more recent version of CF which we'll be doing later this year.
    Thanks,
    Dave
    >>>>>>>>>>>>
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77FCAFF8
    Function=[Unknown.]
    Library=C:\WINNT\system32\ntdll.dll
    NOTE: We are unable to locate the function name symbol for the error
          just occurred. Please refer to release documentation for possible
          reason and solutions.
    Current Java thread:
              at java.io.WinNTFileSystem.list(Native Method)
              at java.io.File.list(File.java:915)
              at coldfusion.mail.MailSpooler.refreshSpoolFiles(MailSpooler.java:1484)
              at coldfusion.mail.MailSpooler.run(MailSpooler.java:897)
              at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201)
              at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:70)
    Dynamic libraries:
    0x00400000 - 0x0040F000           C:\CFusionMX\runtime\bin\jrun.exe
    0x77F80000 - 0x77FFC000           C:\WINNT\system32\ntdll.dll
    0x7C570000 - 0x7C624000           C:\WINNT\system32\KERNEL32.dll
    0x7C2D0000 - 0x7C335000           C:\WINNT\system32\ADVAPI32.dll
    0x77D30000 - 0x77D9F000           C:\WINNT\system32\RPCRT4.dll
    0x78000000 - 0x78045000           C:\WINNT\system32\MSVCRT.dll
    0x08000000 - 0x082A7000           C:\CFusionMX\runtime\jre\bin\server\jvm.dll
    0x77E10000 - 0x77E6F000           C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7D000           C:\WINNT\system32\GDI32.dll
    0x77570000 - 0x775A0000           C:\WINNT\system32\WINMM.dll
    0x10000000 - 0x10007000           C:\CFusionMX\runtime\jre\bin\hpi.dll
    0x00770000 - 0x0077E000           C:\CFusionMX\runtime\jre\bin\verify.dll
    0x00780000 - 0x00798000           C:\CFusionMX\runtime\jre\bin\java.dll
    0x007A0000 - 0x007AD000           C:\CFusionMX\runtime\jre\bin\zip.dll
    0x39A70000 - 0x39A7F000           C:\CFusionMX\runtime\jre\bin\net.dll
    0x75030000 - 0x75044000           C:\WINNT\system32\WS2_32.dll
    0x75020000 - 0x75028000           C:\WINNT\system32\WS2HELP.DLL
    0x782C0000 - 0x782CC000           C:\WINNT\System32\rnr20.dll
    0x77980000 - 0x779A5000           C:\WINNT\system32\DNSAPI.DLL
    0x75050000 - 0x75058000           C:\WINNT\system32\WSOCK32.dll
    0x77340000 - 0x77353000           C:\WINNT\system32\iphlpapi.dll
    0x77520000 - 0x77525000           C:\WINNT\system32\ICMP.dll
    0x77320000 - 0x77337000           C:\WINNT\system32\MPRAPI.dll
    0x75150000 - 0x75160000           C:\WINNT\system32\SAMLIB.DLL
    0x7CDC0000 - 0x7CE10000           C:\WINNT\system32\NETAPI32.DLL
    0x7C340000 - 0x7C34E000           C:\WINNT\system32\Secur32.dll
    0x77BF0000 - 0x77C01000           C:\WINNT\system32\NTDSAPI.dll
    0x77950000 - 0x7797B000           C:\WINNT\system32\WLDAP32.DLL
    0x751C0000 - 0x751C6000           C:\WINNT\system32\NETRAP.dll
    0x7CE20000 - 0x7CF0F000           C:\WINNT\system32\OLE32.DLL
    0x779B0000 - 0x77A4C000           C:\WINNT\system32\OLEAUT32.DLL
    0x773B0000 - 0x773DF000           C:\WINNT\system32\ACTIVEDS.DLL
    0x77380000 - 0x773A3000           C:\WINNT\system32\ADSLDPC.DLL
    0x77830000 - 0x7783E000           C:\WINNT\system32\RTUTILS.DLL
    0x77880000 - 0x7790E000           C:\WINNT\system32\SETUPAPI.DLL
    0x7C0F0000 - 0x7C154000           C:\WINNT\system32\USERENV.DLL
    0x774E0000 - 0x77514000           C:\WINNT\system32\RASAPI32.dll
    0x774C0000 - 0x774D1000           C:\WINNT\system32\rasman.dll
    0x77530000 - 0x77552000           C:\WINNT\system32\TAPI32.dll
    0x71710000 - 0x71794000           C:\WINNT\system32\COMCTL32.DLL
    0x70A70000 - 0x70AD6000           C:\WINNT\system32\SHLWAPI.DLL
    0x77360000 - 0x77379000           C:\WINNT\system32\DHCPCSVC.DLL
    0x777E0000 - 0x777E8000           C:\WINNT\System32\winrnr.dll
    0x777F0000 - 0x777F5000           C:\WINNT\system32\rasadhlp.dll
    0x39FB0000 - 0x39FBC000           C:\CFusionMX\runtime\bin\portscan.dll
    0x74FD0000 - 0x74FED000           C:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000           C:\WINNT\System32\wshtcpip.dll
    0x3AAC0000 - 0x3AAC5000           C:\CFusionMX\runtime\jre\bin\rmi.dll
    0x3B9D0000 - 0x3B9D6000           C:\CFusionMX\runtime\jre\bin\ioser12.dll
    0x3BBE0000 - 0x3BC60000           C:\CFusionMX\lib\izmjniado.dll
    0x3C270000 - 0x3C278000           C:\CFusionMX\lib\CFXNeo.dll
    0x780A0000 - 0x780B2000           C:\WINNT\system32\MSVCIRT.dll
    0x780C0000 - 0x78121000           C:\WINNT\system32\MSVCP60.dll
    0x3C280000 - 0x3C28B000           C:\CFusionMX\lib\cfregistry.dll
    0x3C3A0000 - 0x3C3A8000           C:\CFusionMX\lib\PerfmonClient.dll
    0x3C5C0000 - 0x3C5CC000           C:\CFusionMX\lib\cfindex.dll
    0x3C5D0000 - 0x3C7C2000           C:\CFusionMX\lib\vdk200.dll
    0x3C7D0000 - 0x3C805000           C:\CFusionMX\lib\LIBALLRSEI.dll
    0x7CA00000 - 0x7CA23000           C:\WINNT\system32\rsaenh.dll
    0x7C740000 - 0x7C7CC000           C:\WINNT\system32\CRYPT32.dll
    0x77430000 - 0x77441000           C:\WINNT\system32\MSASN1.dll
    0x3EE10000 - 0x3EE3E000           C:\CFusion\CustomTags\GetUserGroups.dll
    0x77800000 - 0x7781E000           C:\WINNT\system32\WINSPOOL.DRV
    0x76620000 - 0x76631000           C:\WINNT\system32\MPR.DLL
    0x7CF30000 - 0x7D176000           C:\WINNT\system32\SHELL32.dll
    0x3F650000 - 0x3F75A000           C:\CFusionMX\runtime\jre\bin\awt.dll
    0x75E60000 - 0x75E7A000           C:\WINNT\system32\IMM32.dll
    0x3F760000 - 0x3F7B0000           C:\CFusionMX\runtime\jre\bin\fontmanager.dll
    0x72800000 - 0x72846000           C:\WINNT\system32\ddraw.dll
    0x728A0000 - 0x728A6000           C:\WINNT\system32\DCIMAN32.dll
    0x72CF0000 - 0x72D84000           C:\WINNT\system32\D3DIM700.DLL
    0x690A0000 - 0x690AB000           C:\WINNT\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    PSYoungGen      total 5824K, used 1523K [0x10010000, 0x10800000, 0x138f0000)
      eden space 3520K, 26% used [0x10010000,0x100fa4e0,0x10380000)
      from space 2304K, 25% used [0x105c0000,0x106528b0,0x10800000)
      to   space 2304K, 0% used [0x10380000,0x10380000,0x105c0000)
    PSOldGen        total 29824K, used 22612K [0x138f0000, 0x15610000, 0x30010000)
      object space 29824K, 75% used [0x138f0000,0x14f051e0,0x15610000)
    PSPermGen       total 20736K, used 20580K [0x30010000, 0x31450000, 0x38010000)
      object space 20736K, 99% used [0x30010000,0x314293b0,0x31450000)
    Local Time = Fri Dec 13 13:50:53 2013
    Elapsed Time = 19424
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Server VM (1.4.2-b28 mixed mode)
    space 3520K, 26% used space 2304K, 25% used space 2304K, 0% used space 29824K, 75% used space 20736K, 99% used# An error report file has been saved as hs_err_pid2920.log.
    # Please refer to the file for further information.

    CF6, Java 1.4.2 and Windows NT - have not seen those for a long time myself.
    Perhaps this is the issue from error report:
    PSPermGen       total 20736K, used 20580K
    object space 20736K, 99% used
    I guess Java non heap space Permanent Generation is full the next object trying to load into that space can’t fit, plus all the objects in there are referenced so no objects can be removed so free space can’t be made available. One would need to do some work with Java logging and know what JVM.CONFIG looks like to know if that guess is accurate.
    You could try increase that parameter 10Mb or so and see what happens? In JVM.CONFIG, JVM args, -XX:MaxPermSize=NNm where NN = numbers.
    Needless to say you are running a lot of end of life product and should plan to migrate to something more current.
    HTH, Carl.

  • Currency Conversion on Daily Basis

    Hello
    We have data in 4 different currencies in transactions level and I have a requirement in BW to convert the currency on Daily basis based on that day's exchange rate.
    And Also I should be giving the user a selection option to pick a currency type, so that the report will display in that currency.
    Can someone please tell be the best approach to do this?
    Thanks
    Kumar

    Hi,
    Please refer the following How to doc...This is the best possible way you can do..
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b7b2aa90-0201-0010-a480-a755eeb82b6f
    Thanks
    Vj
    You can apply the same for Currency conversions too
    Message was edited by:
            Vijay kumar Nandipati

  • I want to save several written reports for my job on a daily basis on my iPad from my computer is there an app or anyway to do this? Organize,rename and save documents to my iPad?

    I scan several reports on a daily basis to my computer I wanted to know is there any app or anyway I can save these documents to my iPad and make sure they are backed up? Also I would like to organize them by name and date is there an app out there that can do this or anyway? I work in a court house with several reports on a daily basis any help please?

    I just have the normal app and have had no issue with it. I think the only bug I've heard of is sometimes people start a new document and the Docs to Go will not acknowledge the input of a wifi keyboard until you type a few characters on the on screen keypad, but that may have been fixed.
    I find documents easy to find. I have two main folders on my iPad, the desktop folder which has my 'to be kept synced' documents and then another folder with the documents i've put on it permanently. It lists them alphabetically  so my only issue finding things is scrollling down 300+ documents.
    One thing that I think the premium app has is the ability to access documents via  the internet.
    How I do it is, I have my document in the sync folder. I open up the docs to go desktop app, open up docs to go on the iPad, tap the sync button and the documents sync...so you do have to have wifi. not sure if that's an issue or not. It's never taken me more than a few seconds to sync.
    I do konw that you can buy the basic version and upgrade for the cost difference, so you can always experiment and upgrade if necessary.

  • Automatic scheduling and mailing of Check register ( FCHN ) on daily basis

    Hi All,
    I have a urgent requirement wherein I have to schedule FCHN (check regsiter) on daily basis and send the report to group of user.Just want to check is this possible to achieve the same.
    Constraint is user requires the the same format as we achieve when we mail the report after output via sap office inbox.
    It is also required to put some body text and send the entire output as attachment in htm format to the mail id of required users.
    The same process as we are doing now manually like after executing the report From menu option LIST-> SEND TO-> MAIL RECIPIENT, there they put something in body and also fill the required mail id where the mail to be send.
    Instead of doing manually on everyday basis  , they want this process to scheduled automatically.
    Please suggest on urgent...
    Regards

    Hi,
    Thanks for your reply,
    Could you please help me trace out how to put some custom text in the mail body that is received to spool receipts .
    As of now they are getting blank mail body with attachment in htm format which actually contains the data.
    Is there any way out to form the subject of the mail.. which now basically contains the background job name.
    Please suggest.
    Regards

  • GL Balances on Daily Basis/ Per Day

    Hi
    Any One Know How Get Gl Balances on Daily Basis. I Mean Per Day. We have Requirement for Daily P & L.
    I have searched on every segment. but not found any answer of this question. Is there any development. Please Suggest
    Mann

    Dear:
                    Its very easy to use as per your requirement. Once you have executed the GL report for GLs you wan to see. 1st fetch the Account filed into your layout and and then apply subtotal function to it. Collapse it and save it as Default or user default variant (according to the requirement)from settings. Now every time you will run the report it will display every GLS consolidated balance in a single line for the date specified in input.
    Regards

  • Generation of planned order through MRP on daily basis

    Hi
    I am finding some issues in planning. My requirement is to create planned order everyday. So in MD61 the qty is entered on daily basis say X, X1, X2 etc for one week. My planning strategy is 40, MRP type PD, Lot size TB, Individual 1. When I am running MRP I am expectimg the planned order to be generated for each day against the required qty. But the MRP run is combining the requirements of X, X1... etc and giving 1 or 2 planned order. What went wrong? I also tried with strategy 30. But in vain. So how can I generate the planned order daily basis?
    Thanks & Regards

    Dear,
    In MD61 or MD62 and select the perticular material and then goto edit and period splitting and select Day.
    Take MRP run with Planning mode = 3 Deleted and Recreated.
    Also refer this useful link,
    Re: Requirement
    Regards,
    R.Brahmankar

  • How do I stop daily "system upgrade" messages.

    How do I stop Verizon from sending me "system upgrade available" messages from being sent on a daily basis? I did the upgrade weeks ago, but I continue to get these super annoying messages from Verizon.
    Can I block them?

    Thank you all for your replies.
    Hello keithdunlop, 
    Software updates are meant to improve your device. You will continue to receive a notification until the update goes through. If you continue to experience difficulties updating your software please feel free to reach out to us for assistance.

Maybe you are looking for