+ Reply to Thread
Results 1 to 8 of 8

Excel aggregating function based on an attribute/field

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel aggregating function based on an attribute/field

    I've got an excel file with columns,

    C_IP
    SESSION_ID
    CS_USER_AGENT
    CS_URI_STEM
    CS_URI_QUERY
    WEB_LINK

    I'm not able to aggregate the above attributes due to the limitations of the string size allowed in Oracle (11g). I tried to use a user-defined aggregating function for this. I want to aggregate the "WEB_LINK" column, and group by C_IP. Is it possible to do this in Excel?

    The SQL query I tried to use was,

    Please Login or Register  to view this content.

    Cross-posts:

    http://www.mrexcel.com/forum/excel-q...ml#post3345639

    http://stackoverflow.com/users/18885...?tab=questions

    http://www.excelguru.ca/forums/showt...=5973#post5973
    Last edited by Saya22; 12-19-2012 at 12:21 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel aggregating function based on an attribute/field

    I am not sure what is your expected output can you please elaborate it with an excel file?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    12-18-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel aggregating function based on an attribute/field

    There are around 7312 records.. After aggregating the records, the number of rows should reduce. Aggregate functions in Oracle usually return a single result row based on groups of rows, rather than on single rows. Oracle applies the aggregate functions to each group of rows and returns a single result row for each group.

    So when taking a table/file with only two columns into account, C_IP and WEB_LINK, you could consider that it's trying to remove duplicates from C_IP, and aggregating WEB_LINK data into a single row for each corresponding C_IP value. So, if you try to remove duplicates from the C_IP, there are around 1176 unique values, but can't do the same for WEB_LINK since the value is made up of urls.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Excel aggregating function based on an attribute/field

    @Saya22,
    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    HTH
    Regards, Jeff

  5. #5
    Registered User
    Join Date
    12-18-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel aggregating function based on an attribute/field

    Sorry, I'll do that right away..

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel aggregating function based on an attribute/field

    In excel make use of the Pivot Table Option which will do the work like aggregate in Oracle. If possible attach a sample workbook to know how to do it.

  7. #7
    Registered User
    Join Date
    12-18-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel aggregating function based on an attribute/field

    Thanks! It works.. But do you know how I can put the values in one row?..

    Pivot.jpg

    For example, the rows below the C_IP value 12.148.209.196, I want to concatenate them into a single row.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel aggregating function based on an attribute/field

    Now I understand your requirement. But it is not possible in Pivot and it is possible in Excel VBA code if the concatenating text size not more than 32,767 characters.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1