Report Sage with different users in the output column

Hi all

IM using Oracle 10 g Release 2.

I have a Table Transaction_Details as below

Posted in forward to username

14/02/2012 50 25 aa
14/02/2012 20 0 aa
14/02/2012 110 20 bb
14/02/2012 100 30 bb
14/02/2012 150 25 cc
15/02/2012 75 20 aa
15/02/2012 110 40 bb
16/02/2012 100 45 cc
16/02/2012 150 25 bb

I want the result of output as,

Date uploaded waiting for user uploaded in expectation of the user uploaded the user pending
14/02/2012 70 25 210 50 150 25 cc aa bb
15/02/2012 75 20 110 40 bb aa
16/02/2012 150 25 bb 100 45 cc

But,

I can able to generate output using Group By function,.

14/02/2012 70 25 aa
14/02/2012 210 50 bb
14/02/2012 150 25 cc

Kindly share your idea to do this.

Thanks to the advance, im trying to get outout through a function,

Is it Possible in Sql and Plsql.

Looks like you want something like that...

SQL> ed
Wrote file afiedt.buf

  1  with t as (select to_date('14/02/2012','DD/MM/YYYY') as dt, 50 as up, 25 as pe, 'aa' as usr from dual union all
  2             select to_date('14/02/2012','DD/MM/YYYY'), 20, 0, 'aa' from dual union all
  3             select to_date('14/02/2012','DD/MM/YYYY'), 110, 20, 'bb' from dual union all
  4             select to_date('14/02/2012','DD/MM/YYYY'), 100, 30, 'bb' from dual union all
  5             select to_date('14/02/2012','DD/MM/YYYY'), 150, 25, 'cc' from dual union all
  6             select to_date('15/02/2012','DD/MM/YYYY'), 75, 20, 'aa' from dual union all
  7             select to_date('15/02/2012','DD/MM/YYYY'), 110, 40, 'bb' from dual union all
  8             select to_date('16/02/2012','DD/MM/YYYY'), 100, 45, 'cc' from dual union all
  9             select to_date('16/02/2012','DD/MM/YYYY'), 150, 25, 'bb' from dual)
 10  --
 11  -- end of test data
 12  --
 13  select dt
 14        ,max(decode(rn,1,up)) as up_1
 15        ,max(decode(rn,1,pe)) as pe_1
 16        ,max(decode(rn,1,usr)) as usr_1
 17        ,max(decode(rn,2,up)) as up_2
 18        ,max(decode(rn,2,pe)) as pe_2
 19        ,max(decode(rn,2,usr)) as usr_2
 20        ,max(decode(rn,3,up)) as up_3
 21        ,max(decode(rn,3,pe)) as pe_3
 22        ,max(decode(rn,3,usr)) as usr_3
 23  from (
 24        select dt, up, pe, usr
 25              ,row_number() over (partition by dt order by usr) as rn
 26        from (
 27              select dt, sum(up) as up, sum(pe) as pe, usr
 28              from t
 29              group by dt, usr
 30             )
 31       )
 32* group by dt
SQL> /

DT                         UP_1       PE_1 US       UP_2       PE_2 US       UP_3       PE_3 US
-------------------- ---------- ---------- -- ---------- ---------- -- ---------- ---------- --
14-FEB-2012 00:00:00         70         25 aa        210         50 bb        150         25 cc
15-FEB-2012 00:00:00         75         20 aa        110         40 bb
16-FEB-2012 00:00:00        150         25 bb        100         45 cc

Keep in mind that the projection of SQL is fixed, then you need to include enough max (decode statements... to satisfy the expected number of rows that will be rotated for each date.

{: identifier of the thread = 2309172}

Tags: Database

Similar Questions

  • How many user take RDP at the same time with different user login ID in Server R2 2012

    How many user take RDP at the same time with different user login ID in Server R2 2012?

    How many user take RDP at the same time with different user login ID in Server 2008 R2?

    How many user take RDP at the same time with different user login ID in Server 2012 starndard?

    How many user take RDP at the same time with different user login ID in Server 2008 standard?

    This issue is beyond the scope of this site (for consumers) and to make sure you get the best answer, we need to ask either on Technet (for IT Pro) or MSDN (for developers)

    If you give us a link to the new thread we can point to some resources it
  • Combine data sources with different granularity in the same fact table?

    I have two operating tables 'Incident (157 columns)' and 'unit (70 Colums) '. For all the "incidents" happening there could be one or more records in the table of the 'unit '.

    As part of my design of data mart, I have merged the tables in one "makes the incident (227 columns)" and insert records from two tables with a join condition between them [incident. IN_NUM = Unit.IN_NUM].

    Is this correct, is my question? or am I mix data sources with different granularity in the same fact table. Appreciate your help.

    Best regards
    Bees

    Bees,
    Are the measures of the 'Incident', repeated during an incident given, in more than one record in the table of the unit? If so, then the sum (indicent.measure) will give an incorrect result?

    What is there to merge physically tables set outside OBIEE? With OBIEE you might have a table of 'facts' logic to present the user with report, which from tables separated units and Incidents and would stop the occurrence of incorrect aggregations. A common piece of modeling in the same way would be arrested in OBIEE headers and lines of command, quite common to have a logical fact 'orders' which contained the two header orders and order line, this translates into the Incidents-> relationship of units.

    To do what I mentioned, is relatively simple, you need a "Dim - Incident" at two levels, unit, mapp and Incident unique identifiers as keys to level and then use these levels to define the content of the levels correctly in your 2 tables logic sources logic "done", IE the LTS Incidents at incident level LTS units as level of units.

    Hope this helps, let us know if you get stuck.
    See you soon
    Alastair

  • share 'Start' content and presentation of the tile with multiple users on the same Tablet Windows RT

    Hello

    Can someone tell me if it is possible to share/copy the content start and the tile layout with multiple users on the same shelf?

    Hello

    Welcome to the Microsoft community.

    Unfortunately, you will not be able to share or copy the content start and available to tile with multiple users. However, you can rearrange the tiles and select the content to be displayed manually on each of the user accounts.

    See these articles for more details:

    Customize the splash screen

    http://Windows.Microsoft.com/en-in/Windows-8/start-screen#1TC=T1

    Reorganization of the tiles start

    http://Windows.Microsoft.com/en-in/Windows-8/rearrange-tiles-start

    I hope this helps. Let us know if you need more assistance.

  • Why I get two files with different names but the same image when I save in 2015 CC Photoshop?

    Why I get two files with different names but the same image when I save in 2015 CC Photoshop?

    Try resetting the PS preferences - Preferences in Photoshop

    ~ Rohit

  • Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the

    Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the move tool. They have become a composite of two layers which could be developed further with the mask tool.

    Hello

    Please go to the preferences > workspace and uncheck the option 'open the document in the tabs '.

    Now you can click on file and choose file > open and open the two images in two different windows which can be arranged side by side.

    Thank you

  • I want to get only year sysdate with my name of the defined column. but not able to get it.

    I want to get only year sysdate with my name of the defined column. but not able to get it.

    SQL > select to_char (sysdate, 'yyyy') as 'mahesh tyagi' from dual;

    Mahé

    ----

    2015

    SQL > select to_char (sysdate, 'yy') as 'Manu' from dual;

    my

    --

    15

    So I couldn't do 'Manu' or "mahesh tyagi" as the column name.

    The column name is "mahesh tyagi" is simply displayed it shortened to sqlplus due to the known values in the column length.

    create table year_test select to_char (sysdate, 'yyyy') "mahesh tyagi" double;

    year_test / / DESC

    You can change the way sqlplus displays the header of column with something like

    column "mahesh tyagi" format a15

  • connection to Oracle ebs with 2 different users of the same machine

    Hi all

    I need your help, I want to know if it is possible to connect with two different users of oracle connection and work with forms and reports from MY MACHINE to oracle ebs SERVER connected to a network. your help will be appreciated, thanks in advance.

    my computer is: Windows 7 64

    my browser: internet explore machine

    OS: rhel Server 6.1

    EBS:12.1.3

    Thank you.

    Hello

    If you use IE 8 or later, you can go to file-> new Session, open the application and connect with a different user.

    https://support.Microsoft.com/en-us/KB/968341

    Kind regards

  • Different users accessing the data with different rights

    Hello
    I just started with Oracle and I don't know if
    This is the right way for what I was intending.

    I want to allow access to the data (tables, views,...) to different users with different rights.
    For example a user with select only the rights and another with select and insert rights.

    Database Oracle 10 g Express Edition is.

    Here are the steps I did:

    -This user will be allowed to select only
    create user UserSelectOnly...;

    -This user will have select and insert privileges
    create user UserSelectAndInsert...;

    -This user only contains data
    create user BaseDB...;

    -creation of test in BaseDB data
    create the table tdTest (...);

    -definition of role in BaseDB for right to select
    create the role RoleSelectOnly;

    -granting SELECT privilege for RoleSelectOnly
    Grant select on tdTest to RoleSelectOnly;

    -select grant (role) to the user UserSelectOnly
    grant RoleSelectOnly to UserSelectOnly;

    -definition of role in BaseDB to select and insert privileges
    create the role RoleSelectAndInsert;

    -grant select and insert privilege for RoleSelectAndInsert
    Grant select, insert on tdTest to RoleSelectAndInsert;

    -grant select and insert (role) to the user UserSelectAndInsert
    grant RoleSelectAndInsert to UserSelectAndInsert;

    My problem is that the definition of user (BaseDB) works as a database.
    Are there more effective ways in Oracle 10 g Express?

    Thank you
    Wilfried

    Hello Wilfried and welcome to the forum.

    First of all, it's a property that you have given time to review the security of the database.

    My immediate comments:

    You have 3 users:

    -This user only contains data
    create user BaseDB...;

    Very well, good thing. Use an administrative account/data owner.
    You might consider locking when you do not have administrative tasks in the schema.

    -This user will be allowed to select only
    create user UserSelectOnly...;

    -This user will have select and insert privileges
    create user UserSelectAndInsert...;

    OK, but no need to take account of their privileges in the names. You could simply call their

    SomeUser
    AnotherUser

    You have two roles

    -definition of role in BaseDB for right to select
    create the role RoleSelectOnly;

    -definition of role in BaseDB to select and insert privileges
    create the role RoleSelectAndInsert;

    Seems ok, it's a good thing here for the description of privileges in the role itself.

    Maybe I would call them something like
    RoleSelect or RoleRead or BaseDBSelectRole
    RoleInsert or RoleWrite or BaseDBUpdateRole

    Should be updated (and DELETE), as well?

    Another approach would be to separate between the tables.

    For a group of tables, select, insert, update, delete are granted to a role.

    For another group of tables, different privileges are granted to another role.

    That is, there is no general answer, correct, it depends on your application.

    Often the roles are used for ease of maintenance. In other words, if you have several users who need
    the same set of privilege, these are maintained by a role.

    Maybe you don't want to use roles, but I like them.
    But attention not only

    Select on all tables to a single role
    Insert on every table to another role
    Update on all tables to a third party role.

    Unless, of course, it gives meaning to your scenario.

    My problem is that the definition of user (BaseDB) works as a database.
    Are there more effective ways in Oracle 10 g Express?

    Not sure what you mean. Schema in Oracle and user are often used for the same thing.

    In your case, BaseDB is the owner of (all) the tables, no problem.
    As mentioned, you might choose to block the account.

    The main thing is, no application, or ad-hoc user should log in as BaseDB

    And the users of your system should be exactly the privileges they need to do their jobs
    nothing more, nothing less.

    Concerning
    Peter

  • I want to share address books between different users on the same PC

    Hello
    We have a PC with two different users, but there is only one email address shared between them. We have a copy installed Thunderbird one of each user and a user has multiple accounts for privacy reasons. It would be really useful to have a shared common address book to access addresses of. Is this possible?

    Cheers, Marcus

    Marcus,
    It's really simple comes to mind, but here are two ideas to consider, depending on how often Exchange address book:
    (1) if the shared e-mail address is gmail, each user can then install the add-on gContactSync and let Google have the master copy. That would give each of you frequent clocks to the same address book.
    (2) easy, but not automatic approach would be for a user to be responsible for changes and periodically (daily, weekly,...) export the address book to a ldif file. The other user could then import the address book on behalf of TB.

    - duggabe
    
  • How to get bookmarks on Aurora to be the same for different users on the same computer?

    When different users on my macbook login, I wan tehm all see the same configuration and saved bookmarks for Aurora. How can I do that. Trying to export from one setupproperly seemed to be the right thing to do. But when importing, there was too much here. the stuff of front and the news trying to be imported. He also made records duplicated with the same names. Is t he a profile simple file for bookmarks that can be exported and imported into the new area people.

    The profile is a file that store your personal information in a safe place

    https://support.Mozilla.com/en-us/KB/recovering%20important%20data%20from%20an%20old%20Profile

  • How do I sync and import/export bookmarks between different users on the same computer and two using the Firefox browser?

    All the help instructions are to import and export bookmarks bookmarks between different brands of browsers.

    Assuming that each of these different users use a different profile of Firefox. You can use the built in Fx4 Sync feature. Click on Setup Sync in the menu selections, create an account and then have each user created their profile to use this new account synchronization. It syncs more bookmarks; things like history, passwords, etc. So if it's only the bookmarks you are concerned with that, use customize only synchronize bookmarks when you set up each user. Good luck and have fun in sync.

  • How can I transfer files between different users on the same computer

    I set myself upward under a different name on my laptop father but necessary for the transfer of files from the original user (IE my father'd Office) to my new! How can I do this?

    The following instructions assume that you want to have two users on the computer and you do not want to move some files from one user to another user.  If this isn't the case, skip the following and post a reply.

    If the above assumption is correct, log in with administrator privileges or the user who currently owns the files and click Start > computer (in the list of the menu Start right under Documents, photos, etc.) and in the computer, double-click the drive where the files are located and then double-click on the 'Users' folder and double-click with the record of the original user and work your way to the files you want to move.  Leave this window open (and possibly drag it to the right of your screen until the mouse touches the edge and it automatically resizes to fit the right of your screen or you can resize it manually).  Then repeat the same instructions (start > computer, etc.) but the second time, when you open the 'Users' folder, navigate to the new user.  The two windows open you can now drag files from one window to the other.

  • IMac is not able to share multimedia files with multiple users on the same computer.

    We just bought a new IMac that we were very excited.  We have phones Apple and iPads, replacement and ten year with a new Mac old PC made since.

    Now, the trouble begins. For more than ten years Windows had several usernames on the same machine and have been able to have a shared folder only for music, pictures and video that my iTunes program and others could acsess and share from several user names. This kept all in one place for new photos families by me or my wife and our 30 gigabytes of music that comes from our CDs was available at bolt of us. Now in train to implement on IMac should be easy but is impossible.  after transferring the music to my login information, it cannot acsess all files on my login. I am not even able to share or provide his acsess. I can move the iTunes folder to my shared folder. She can get acsess now but iTunes says that the library file is locked. I worked with care from Apple on the phone for that sold, but they believe it will not be possible without creating two copies of the 30 gigabytes of music for each of us. who would take more hard drive when it failed too.  Sharing is not any help. These files were before iTunes. I'm not pay 30 dollars a month to store in icloudcor use a google reader slow to the Internet connection when everything's fine here. Apparently Applow programmers do not believe in sharing of multimedia files between two users on the same device, even if a PC does that very well. My choice here is so far have duplicates of all the photos, music and videos loaded on the disc for me and my wife, charge all the media for an external hard drive which for some reason any all Apple programs will share, or return the mac to another PC that will be able to make several connections with sharing music and photos. Apple if you are reading this you are 10 years behind on that. Not everyone is born in the last five years and bought their music on iTunes to be able to use home sharing. Home sharing cannot help this. your applications should be able to be told to use the media files shared without import copies to readers of the user. I am very disappointed. Someone else has any ideas for that?  I have pictures, not iPhoto. I have a week more to be able to return it. I'm not interested in making a fake account that is always connected to share or maintaining of me constantly connected. It should have been easy, I had to be happy to play with new software.

    Photos, iPhoto and iTunes libraries must appear on an external hard drive that is formatted as shown below to be used by multiple users on the same Mac:

    So get a properly formatted external HD and move your iPhoto/pictures of her as well as your iTunes library.  This way all your iMac users can access and use both libraries.

    An alternative to the external HD method is to partition your internal hard drive into two partitions, one for libraries.  It is formatted as shown above and be large enough to contain the libraries and allow the expansion of libraries.

  • What happened to the "Log-in as long as different user" when the computer is locked on Windows XP?

    I work in the it Department in a company and recently we have improved some of the computer to windows 7. For security reasons, computers must be locked when they are inactive for 30 minutes. The problem is that if another user needs to use the computer, it must be connected to the wide, because even the "shut down" and "restart" were removed from the "locked" screen Now on XP, in addition to these two options, we may also log in as a different user.

    So my question is: is there a way to unlock the computer apart to disconnect the power cable? Should ' t the administrator be able to unlock it?

    Thank you

    André

    Hello

    Yes, you are right. This is perhaps due to the issue of the domain. As I suggested in my first post, please post this question in the TechNet forum.

    Thanks and greetings
    Umesh P - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

Maybe you are looking for

  • How can I reduce the size of the var/tmp?

    I have a 64 GB of storage on my Macbook Air and 16 GB of tmp files it take all this. I want to reduce the size, because I can't try to manage with very limited storage space. http://i.imgur.com/5pNt98l.PNG

  • Qosmio PX30T-OOM: Questions about specifications

    I looked in the specifications for the Toshiba PX30T-OOM online and see no mention of this hard drive comes with this computer. Can anyone provide this information please? In addition, this computer didn't go out 3D on a 3D TV? I guess that the scree

  • How to get a reference to the delivery of the program (not at base of LV)?

    Hello I need to create a LV application which will be: -Run external executable and not on LV. It has a window of the UI which will open -Open PS (no title, menus, etc.) and position it under the user interface -If the user moves main UI, LV app FP f

  • WRT610N (new) packet loss

    I've read through the forums for a few hours and and I've seen others with this problem, but no clear solution. I installed my new WRT610N (FW 1.00.18) and I experience packet loss when ping. When I ping from my laptop to an AT & T (4.2.2.2) DNS serv

  • HP ENVY 15 Notebook PC: Touchpad and erratic cursor movement problem

    My cursor shows erratic all over the screen movements while trying to move from one place to the other. This happens when I use my touch pad to control the cursor. After showing the erratic movements, it starts clicking Cesti on the entire screen. Cl