Grouping alternative.

Hi All,
select max(Transaction_date) measure_date
from PCN_COUNT_TRANSACTIONS
WHERE transaction_date > '2012-01-01'
group by month(transaction_date), year(transaction_date)The purpose of above subquery is to return the last transactions date for each month.
This query is taking lot of time to return data as the data volumne is really huge. Is there a alternative way to do this?
Thanks and Regards
Nagaraja Akkivalli.

Nagaraja Akkivalli wrote:
This is what I was expecting guys...
select max(Transaction_date) measure_date
from HR.PCN_COUNT_TRANSACTIONS
WHERE transaction_date > '2012-01-01'
group by LAST_DAY(Transaction_date)
Nagaraja Akkivalli wrote:No more commnets to this thread plz.But it is not a good practice to post a wrong query as a correct one. People may refer these threads in future
If your date filed is varchar2, how do you expect LAST_DAY to work?
SQL> select last_day('2012-01-01') dt
  2  from dual;
select last_day('2012-01-01') dt
ERROR at line 1:
ORA-01861: literal does not match format stringAnd even if it works, what is the advantage you see in using LAST_DAY, instead of TO_CHAR - How will it address your performance issue ?

Similar Messages

  • Group & alternative account number field

    hi,
    1) i do not see group account number field in FS00, FSS0 or FS01/02/03 but i can see alternative account no. i know this alternative acc no is meant for country specific.
    why i cannot see this group acc number field?
    2) why i do not see country specific account show in alternative acc no? for example in obd4, there is sales acc and also local gaap sales account. when i disply operating sales acc, i do not see local gaap sales acc show in alternative acc number field.
    thanks

    hi,
    thanks alot. point given.
    1) may i know if local gaap account also in the same coa just like operating coa, then do we need to assign this local gaap account in alternative acc number field?
    2) why in the same coa, there have more than 1 type? operating gl acc, local gaap gl acc and also ifrs gl account.
    3) how do i know which account to post to as all of them in the same chart of acc?
    thanks

  • Share Permissions

    Hi,
    So I have a Win 2008 R2 server in a workgroup which I log onto with a local administrator account. From that machine and logon I want to connect to a file share on a Win 2012 R2 server connected to a domain. Network connectivity is in place. Is
    this possible?
    So far I have tried to use the 'Everyone' and 'Anonymous Logon' group for the Share and NTFS permissions, but no luck.
    I know that I could create a new domain user and use that to permission the share, but that would require me to enter those credentials on my Win 2008 R2 server for access. What I am really looking for is a share with fully open permissions,
    so that anyone in the connected network segment can access. I have separate VLANs so security is not an issue.
    Can anyone tell me if there is a group \ alternative way of doing this to get it working?
    Thanks.

    Hi Steve,
    Please check these steps and feel free to post back the result:
    1.  Enable the guest account
    2.  Add the everyone group to both the share and the security permissions.
    3.  Open the Local Security Policy
    4.  Network Access:  Let Everyone permissions apply to anonymous users = Enabled
    5.  Network Access:  Named Pipes that can be accessed anonymously = (add)
    sharename
    6.  Network Access:  Restrict anonymous access to Named Pipes and Shares = Disabled
    7.  Network Access:  Shares that can be accessed anonymously = (add)
    sharename
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Profit center hierarchy and closure transactions

    Hi fellows,
    My company is reorganised.
    As the annual closure will last several months, I will need to run 2 profit center hierarchies at the same time.
    I will copy the standard hierarchy 2009.
    The standard hierarchy 2009 will be modified and used for 2010.
    The copy will become an alternative hierarchy used to close 2009 accountancy.
    Do you see any problems to run 2 hierarchies at the same time?
    Is it possible to make the annual closure with an alterative hierarchy for transactions (KKAJ, KSII, KB15N...)
    Thanks a lot
    Vero

    Hi
    You can maintain as many number of hierarchies as possible.
    There is absolutely no problem to maintain any alternative hierarchy but you can't maintain multiple standard hierarchies.
    Profit Centre Standard Hieararchy T.Code is KCH1 - Create, KCH5N - Change, KCH6N - Display
    Profit Centre Group (Alternative hierarchy) T.Code is KCH1 - Create, KCH2 - Change, KCH3 - Display.
    Regards.
    Chandrasekhar Ponugumati

  • Locating the already created webservices in r/3 system

    Hi,
        I have created a webservice of a function module and also while doing this in wizard, I have checked on the check box saying "Realease it for runtime". Where can I find my wsdl file of webservice in the system? I have gone through the transactions WSCONFIG and WSADMIN, but was not able to locate my webservice. Kindly help.

    Dear Rakesh,
    Easiest way,
    T. Code: XD02--> Extras (Menu Bar) --> Administration --> Account group
    Alternatively,
    T. Code: SE16
    Table Name: KNA1, and hit "ENTER".
    On to, next screen, don't key-in any customer range (to list out all the customers, created in to R/3 System) and Execute (F8).
    On to next screen, from menu-bar
    Settings --> Formal List --> Choose Fields
    Here, System will list all the Fields, out of which Field: KTOKD; is Account Group.
    Select appropriate fields, like MANDT, KUNNR, LAND1, NAME1, NAME2, KTOKD (and more, as reqd.)
    OR,
    Report: S_ALR_87012179 (key-in as T. Code)
    Best Regards,
    Amit

  • What video format does iPad prefer?

      I have tried mp4 and mov. files but I always get " can not download - video file is not supported by iPad" . The best part is, I can't even playback videos that are recorded from my iPhone. Any advise?

    For iPad you can play video other than mp4 by:
    1. Using third party player: such as OplayerHD Lite that maximum 720p such as Matroska container, FLV container,  AVI container.
    2. Re-muxing the stream into mp4, it is possible if all stream such as x.264 / AVC / h.264 Video with AAC audio stream. Muxing only re-saving into other container, it takes 1 seconds to 15 minutes maximum for 1080p 2 hours movie.
    3.  Re-encode the whole movie to mp4, this take 1 hour to 1 night, if the stream cannot be player by iPad spec.
    For option 1: Clear enough.
    For option 2 : [PC only - XMedia Recode], this you can view 1080p mp4 movie, take 1-10 minutes
    Download and install Xmedia Recode and mediainfo PC.
    Open the video, make sure the Video is AvC or H.264, or it needs to re-encode using Handbrake or Xmedia Recode, Check the audio, make sure is AAC 2 ch/6ch
    Check the mp4 output, Custom format, sync audio/video
    On the Video tab, check video copy if the video already on AVC or H.264. It will take minutes.
    If it is not AVC or H.264 then uncheck the video copy to re-encode the video. And it will takes hours.
    On the Audio tab, check audio copy if the stream already AAC 2ch/6ch. It will take secods.
    If it is mp3, AC3, DTS , Ogg then it needs to re encode the audio, It will take minutes.
    Insert the title as wish, Dont edit/crop if you are just mux / copy check the video.
    subtitle muxing are not supported to be muxed using Xmedia Recode, nor multi audio streams.
    Add job, Start. The mp4 will be delivered in secods or 10 minutes max if just mux.
    If you have subtitle, or extracted from MKV, make sure has same name file and subrip srt mode.
    You can mux subtitle and mp4 using Subler that available on Mac only.
    You can add metadata, cover, chapter using iTunes or Subler.
    You can view the mp4 without subtitle or m4v Subler result using Video app iPad, or
    You can view the mp4 + movie subtitle srt using third party player like OplayerHD Lite with iTunes plugin on.
    Please remember the 1080p MP4 needs Copytrans manager for transfer to the iPad Video app
    For option 2 : [Mac only MKV input- Subler], you can have the 720p /1080p subtitled m4v for 1-10 minutes
    Download and install Subler free and mediainfo mac free
    Open the video, make sure the Video is AvC or H.264 MKV, if not you must using Handbrake to re-encode it.
    Check the audio, make sure is AAC 2 ch/6ch using mediainfo mac, if it is AC3 will be converted easily using Subler.
    On preferences Subler, check the jpg chapter, and encoding AC3 to Stereo AAC.
    Import mkv streams to subler, after open the mkv.
    If you have multi sound, make sure the first stream is AAC, and the Group Alternative is 1 for all audio streams. If not multi audio stream, just Set Group Alternative  to none.
    If you have subtitle, or multi subtitle, make sure set Group Alternative to 2 for all subtitle, or 1 if the Audio Stream is none Group.
    Add chapter if you wish, chapter should after subtitle streams.
    Insert the title and cover as wish and others metadata as you wish
    Save as m4v. Check both 64 bit if your file ouput was bigger than 2GB.
    Optimize the m4v.
    Please donate to the subler if it useful.
    For option 3: Re-encode with Handbrake take long hours
    Clear enough. With Handbrake you must re-encode the whole movie, but you can mux the soft subtitle also.

  • Portal User needs permissions to start the WebDynpro Content Administrator

    Hi All,
      We are on EP6 SP13 (SR1 installation) with ECC5 as backend.
    We have a user(<b>j2ee_adm_qep</b>) as a default portal administrator.
    When i see <b>Content Administrator >> Webdynpro >></b> i get the webdynpro content administrator screen.. <b>:)</b>
    I have created another portal admin user (<b>myadmin</b>) and gave him all the roles that <b>'j2ee_adm_qep'</b> has..
    Also, Even in the backend ECC system.. Su01 transaction.. i have given
         >>>>> ROLES >>> SAP_J2EE_ADMIN
         >>>>> PROFILES >>> SAP_ALL
    But, when i login as '<i>myadmin</i>' and see the <b>Content Administrator >> Webdynpro >></b> i get the following message:
    Missing Permission
    You do not have the needed permissions to start the Web Dynpro Content Administrator.
    Please contact your System Administrator.
    I want to see the '<b>webdynpro content administrator screen</b>' when i login as '<i>myadmin</i>' too..! '<i>myadmin</i>' should have every permission as <i>'j2ee_adm_qep'</i>.
    Please help me in this regard.. This is kind of urgent.
    Would be grateful for any input.
    Regards,
    SK.

    Hi,
    A user in SAP EP has two types of access "roles", J2EE groups and SAP EP roles. Here you are missing the J2EE group administrator (backend roles in ECC system are not needed).
    The easiest way to change this is to go to user admin -> groups, search for Administrators and add the myadmin user to this group (alternatively use the security provider service of visual admin).
    Dagfinn

  • Creating SUB-PLAYLIST

    I've asked this b4, but no one responded...so I'll try to ask this again:
    Is there any programs available, that will enable my ipod to create "sub-playlist"?
    instead of this:
    LOVE SONGS (MALE)
    LOVE SONGS (FEMALE)
    LOVE SONGS (BAND)
    ALTERNATIVE (GROUP)
    ALTERNATIVE (MALE)
    ALTERNATIVE (FEMALE)
    it will be MORE pleasant to see this:
    LOVE SONGS > MALE
    FEMALE
    GROUP
    ALTERNATIVE > GROUP
    MALE
    FEMALE
    I don't know if its just me being "demanding"...But I think it'll just be a SIMPLE program update to enable this....I wonder why Apple didn't thought about this...or maybe they did...they just want to include features "one by one" for each NEW IPOD.....

    I suppose you, but the way that I am thinking of doing this would require something radical... you could rename your songs, artists, and album in such a way that you could go this way. Perhaps, keep the names of the songs, but you would give up the artist and album to do so. Of course, to retain the artist and album, you could embed this in the title of the song. This is a lot of work and I am not sure if you want to go through all of that, but it would let you do what you are asking. If there is a better, then I hope someone more intelligent than will post. Best of luck to you!

  • Want robust solution for alternating row color, resetting every group

    I would like a solution for displaying an alternating row color for my detail rows that resets every group, so that row 1 is always gray.
    Our Crystal designer provided this code to me:
    @rowcnt formula, suppressed, placed in Detail row:
    Shared numbervar rowcnt;
    rowcnt := rowcnt + 1;
    @resetrowcnt, suppressed, placed in Group row:
    Shared numbervar rowcnt;
    rowcnt := 0;
    Formatting formula, placed in Color in Detail > Section Expert:
    Shared numbervar rowcnt;
    if Remainder(rowcnt, 2) <> 0 then
    color(241,241,241)
    else
    crWhite
    This was working fine for me.
    However, it is suddenly not working in one of my reports.
    The report does happen to have two groups (rowcount.png).
    When the report is run, all rows are colored (rowcount02.png).
    This report was previously working fine!  I'm not sure what changed.
    In any case... surely there must be standard code to do this very standard formatting.
    I would be very grateful if someone could post some robust code to accomplish the following:
    REPORT DATA IN DETAIL ROW, ALTERNATE ROW BANDING:
    - Data in Detail row displays alternating row colors
    - Odd rows are always shaded, even rows not
    - Banding resets every group / does not continue pattern from previous group
    REPORT DATA IN GROUP ROW, ALTERNATE ROW BANDING:
    Some of our reports place row data in a group row (just the way it happened).
    If you could also modify your code in this case.
    Thank you!

    Hi Abhilash/Sastry, since I'm going to switch to Sastry's formulas, could you please confirm correctness of the following. I can't actually run this report, I can only provide it to our London office, bit of a lag for testing.
    @resetrowcnt:
    Whileprintingrecords;
    Numbervar cnt:=0;
    @rowcnt:
    Whileprintingrecords;
    if {HedgeDetails.StrategyID} <> previous({HedgeDetails.StrategyID}) and
    {HedgeDetails.DealID} <> previous({HedgeDetails.DealID}) then
         Numbervar cnt:=cnt+1;
    Details section (Suppress):
    not(OnFirstRecord) and
    {HedgeDetails.StrategyID}=previous({HedgeDetails.StrategyID}) and
    {HedgeDetails.DealID}=previous({HedgeDetails.DealID})
    Please note: Suppress checkbox is selected AND the above formula is entered.
    Details section (Color):
    Whileprintingrecords;
    Numbervar cnt;
    if cnt mod 2 <> 0 Then color(241,241,241) else crwhite

  • Alternative payee for ATI "Temporary Allocation of Companies" group

    Hey everybody,
    May you please help me to define a solution to handle the following
    situation?
    There are many ATI group vendors, each of them is constituted by one assignee, different invoicing parties and one payment recipient corresponding to the assignee. Each invoicing party can belong to different ATI groups.
    All the purchase orders issued to a vendor defined as a ATI group will have the invoicing party one of the Companies, but the payee will always be the assignee of the group. Our problem is to handle this circumstance.
    One solution is to update all the invoicing parties master data of a ATI group, specifying the assignee of the ATI as a alternative payee; this for each ATI group.
    This solution, viable because if the invoicing party accept at least one different payee the system allows to specify one of them during the invoice entering, is time-consuming to be handled, and it is not optimal because one invoicing party could have different alternative payees (if belonging to different ATI groups). Furthermore, these payees would be not controlled and during the invoice registration an incorrect alternative payee might still be selected.
    The solution we would like to apply is to indicate in the ATI group vendor master data:
    - the assignee (it could be a partner role defined ad-hoc)
    - the list of the invoicing parties (partner function PI)
    - the payment recipient (alternative payee / partner function AZ)
    without updating all the invoicing parties master data.
    During the invoice registration, relating to a purchase order issued to a ATI group vendor, the system should detect that an alternative payment recipient is indicated in the vendor master data and make possible to specify it, although it doesn't appear in the invoicing party master data.
    We have tried to apply this solution, assigning also a partner schema to the purchase order, but it didn’t work because the system shows the payee field in the transaction MIRO only if the invoicing party allows for an alternative one.
    Is there any possibility to apply this solution?
    Thank you very much for your help,
    Jo-anne

    Hi Jo Anne
    I'm also facing same problem did u got any ans for this.
    If u found please reply to me for this ID : [email protected]
    Many thanks...
    Satish H

  • Alternative for 'group by' needed

    Remove group by and sum using Itab
    Hello,
    One report has a select clause  which is retrieving SUM (field) AS field in the field list and USING group by 6-7 fields...
    I want to remove this group by clause, take all records ( without sum ) into another internal table, sort it by these 6 fields ( will define them at the start of structure), loop through it and then use AT NEW for these 6 fields and use collect for summing the field.
    Please give mee some hints or if there is any other alternative.?
    Please advice.
    Thanks,
    Rupalee.

    HI,
    You need to use the SORT and Internal Table Events ..
    SORT ITAB BY FIELD1 FIELD2.
    LOOP AT ITAB.
      L_SUM = L_SUM + ITAB-FIELD3.
      AT END OF FIELD2.
         MOVE DATA TO ITAB2.
         APPEND ITAB2.
      ENDAT.
    ENDLOOP.

  • Alternative Item group not appearing CS11

    Hi all,
    We have created BOM with all the substitution materials which can be used at the time of Production.
    We have utilised the Alternative item group for this. When i look at BOM for a material say X using CS03 i can see the Alternative Item group. But when i explode the BOM using CS11 i cannot see the alternative item group in it.
    The scenario in details is :
    For the header material X i have X1,as component with different change numbers and unique validity dates and  this component is seen in 3 lines in BOM with alternative item groups against it.
    Now when i explode the BOM using CS11 i can see X1 component with alternative group for only 2 line items.
    We are in ECC6.0 version, can i ask you whether there is any patch or oss note to be applied.I have tried searching OSS notes but couldnt find them
    Please advice as this is of very high importance.
    Thanking you
    Regards
    Raj Kiran

    Dear Raj,
    What I wanted to confirm from you is ,after executing CS11--->
    Changing Layout -
    > Selecting Alternative Item group,
    priority,Usage probablitity,the values are not shown in the field
    properly though they are actually present in the BOM?
    So enter the proper valid from dates in CS11(Select the date
    on which the alternative item group is active) & also alternative
    BOM number properly.
    So go ahead as I suggested and even after entering the proper
    valid from dates,Alt.BOM---changing layout ,if its not giving
    proper results,then go for checking OSS notes.
    This is with respect to ECC 6.0.
    Check & revert back.
    Regards
    Mangal

  • Alternative to Group by in oracle 9i

    Dear All;
    I currently have a query which is generating 10,000 rows but when I try applying a simple group by it affects the performance of the query. Hence, is there an alternative to using group by. Thank you.

    but when I try applying a simple group by it affects the performance of the query.If you could show us the query + execution plan with and without the group by, we could have suggestions...
    Adding a GROUP BY to a query that performs nicely, will of course add some additional required cpu processing, but shouldn't necessarily have to change the way the rows that need to be grouped are retrieved.

  • Alternative for group by

    Hi guys i need some help with the logic. As an example, i have table with Account and product columns. So each Account can have multiple products. Now i need SQL to see Accounts that have only Product.
    One way of doing it is by doing a groupby and having count(Account) =1. I need an alternative for this. Please help me with your ideas. Thanks in advance.

    Alberto Faenza wrote:
    Is there any reason why you don't want to use group by or just your curiosity to find alternatives?Simple case would be: "I need to select everything from account table where account has multiple products". And between:
    SELECT  *
      FROM  YOUR_TABLE
      WHERE ACCOUNT IN (
                        SELECT  ACCOUNT,
                          FROM  YOUR_TABLE
                          GROUP BY ACCOUNT
                          HAVING COUNT(*) > 1
    /and
    SELECT  *
      FROM  (
             SELECT  ACCOUNT,
                     COUNT(*) OVER(PARTITION BY ACCOUNT) CNT
               FROM  YOUR_TABLE
      WHERE CNT > 1
    /I prefer the latter.
    SY.

  • An alternative to a Yahoo Group?

    Does business catalyst have an alternative to a Yahoo group? I think it is called 'many to many'.
    If not, are there any plans in the future for such?
    If not, does anybody know of a good alternative?
    Thanks for your help.

    No. And I'm sure it will never have it.

Maybe you are looking for

  • Help with scripting: need to import Excel files into PS type layers

    Howdy all, I have a series of TV commercials provided to me as layered PS files.  I work in CS3 and export to Avid for editing. For customization, I need to import their Excel list of phone numbers and duplicate each one into a type layer with existi

  • How to Populate Scrath Pad dynamically in IC web client..

    Hi all, i am struck in a requirement where i need to autopopulate error message in Scratch pad of IC when CSR accepts the call of Customer.The error message is generated when customer puts any wrong data in IVR.                                      i

  • HT2534 Best practice in setting up an iTunes Connect account for my business

    I have a personal iTunes account but I want to create a separate business account so that I can sign up for iTunes Connect to create books? Any suggestions? Should I create a new iTune account or not. I would like to keep them separate but I don't ne

  • What's the difference between Transferred Records and Added Records?

    When right click an ODS or a cube to select Manage, then under the 3rd tab called Requests, there are two columns called Transferred Records and Added Records, what's the difference between these two? Thanks

  • Why can't I download my old purchases?

    I had recently had my blackberry 9900 stolen so i switched back to my 9780 and when i logged back into my blackberry app world account it had olny shown the previously downloaded apps from this bold and not the one that was stolen even though they we