Transpose in Oracle - Help needed

Hi,
I need your expertise in understand how transpose works in oracle with real example.Please find original data and expected data below.
Query
select SFB_FILENAME,SFB_FILETMG_DATE,SFB_FILETMG_TIME,SFB_EOD_ODATE from SFB_FILETMG;
Original Data
SFB_FILENAME
SFB_FILETMG_DATE
SFB_FILETMG_TIME
SFB_EOD_ODATE
IND_AM_339AM
23-Jul-2013
2:50
22-Jul-2013
IND_AM_335AM
23-Jul-2013
2:50
22-Jul-2013
IND_AM_342AM
23-Jul-2013
2:50
22-Jul-2013
IND_AM_224AM
23-Jul-2013
2:50
22-Jul-2013
IND_AM_338AM
23-Jul-2013
2:51
22-Jul-2013
IND_AM_168AM
23-Jul-2013
2:51
22-Jul-2013
IND_AM_336AM
23-Jul-2013
2:51
22-Jul-2013
IND_AM_335AM
24-Jul-2013
3:51
23-Jul-2013
IND_AM_338AM
24-Jul-2013
3:52
23-Jul-2013
IND_AM_336AM
24-Jul-2013
3:52
23-Jul-2013
IND_AM_342AM
24-Jul-2013
3:52
23-Jul-2013
IND_AM_168AM
24-Jul-2013
3:53
23-Jul-2013
IND_AM_224AM
24-Jul-2013
3:53
23-Jul-2013
IND_AM_339AM
24-Jul-2013
3:53
23-Jul-2013
Expected Data
22-Jul-2013
SFB_FILETMG_DATE
SFB_FILETMG_TIME
23-Jul-2013
SFB_FILETMG_DATE
SFB_FILETMG_TIME
IND_AM_339AM
23-Jul-2013
2:50
IND_AM_335AM
24-Jul-2013
3:51
IND_AM_335AM
23-Jul-2013
2:50
IND_AM_338AM
24-Jul-2013
3:52
IND_AM_342AM
23-Jul-2013
2:50
IND_AM_336AM
24-Jul-2013
3:52
IND_AM_224AM
23-Jul-2013
2:50
IND_AM_342AM
24-Jul-2013
3:52
IND_AM_338AM
23-Jul-2013
2:51
IND_AM_168AM
24-Jul-2013
3:53
IND_AM_168AM
23-Jul-2013
2:51
IND_AM_224AM
24-Jul-2013
3:53
IND_AM_336AM
23-Jul-2013
2:51
IND_AM_339AM
24-Jul-2013
3:53
Thanks

SELECT c.*, d.*
  FROM (SELECT a.sfb_filename "22-Jun-2013", a.sfb_filetmg_date,
               a.sfb_filetmg_time, ROWNUM rn1
          FROM t11 a
         WHERE sfb_eod_odate = TO_DATE ('22-07-2013', 'dd-mm-yyyy')) c,
       (SELECT a.sfb_filename "23-Jun-2013", a.sfb_filetmg_date,
               a.sfb_filetmg_time, ROWNUM rn1
          FROM t11 a
         WHERE sfb_eod_odate = TO_DATE ('23-07-2013', 'dd-mm-yyyy')) d
WHERE c.rn1 = d.rn1;

Similar Messages

  • Help needed on installation of Oracle 9i on Sun Solaris 8

    Hey,
    Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database Configuration Assistant utility to create a database instance. But finally it always tried to create the instance at the root directory ( / ) which doesn't have enough space and then failed. The case was that we have set the enviroment parameters: $ORACLE_BASE = /export/mydata, $ORACLE_HOME = /export/apps/oracle9i. That means it should be installed at /export/mydata, but it didn't. Any help or advice are welcome. Thanks.
    Simon

    I have downloaded Oracle 11G R2 version from Windows and extracted it in Windows and copied it into DVD after extraction in two folders. Now I am mounting that DVD in Solaris 10 installed in my VMware . I made a new directory named as 'installation ' under /export/home/oracle and copied the folders from DVD to 'installation' folder. Now I am entering installation folder and try to do ./runInstaller as 'oracle ' user and getting the error mentioned before.
    Edited by: 916438 on Mar 31, 2012 5:55 PM

  • Help needed on installation of Oracle 9i EE on Sun Solaris 8

    Hey,
    Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database Configuration Assistant utility to create a database instance. But finally it always tried to create the instance at the root directory ( / ) which doesn't have enough space and then failed. The case was that we have set the enviroment parameters: $ORACLE_BASE = /export/mydata, $ORACLE_HOME = /export/apps/oracle9i. That means it should be installed at /export/mydata, but it didn't. Any help or advice are welcome. Thanks.
    Simon

    I have downloaded Oracle 11G R2 version from Windows and extracted it in Windows and copied it into DVD after extraction in two folders. Now I am mounting that DVD in Solaris 10 installed in my VMware . I made a new directory named as 'installation ' under /export/home/oracle and copied the folders from DVD to 'installation' folder. Now I am entering installation folder and try to do ./runInstaller as 'oracle ' user and getting the error mentioned before.
    Edited by: 916438 on Mar 31, 2012 5:55 PM

  • Help needed to loadjava apache poi jars into oracle database.

    Help needed to loadjava apache poi jars into oracle database. Many classes left unresolved. (Poi 3.7, database 11.1.0.7). Please share your experience!

    Hi,
    The first 3 steps are just perfect.
    But with
    loadjava.bat -user=user/pw@connstr -force -resolve geronimo-stax-api_1.0_spec-1.0.jar
    the results are rather unexpected. Here is a part of the log file:
    arguments: '-user' 'ccc/***@bisera7-db.dev.srv' '-fileout' 'c:\temp\load4.log' '-force' '-resolve' '-jarsasdbobjects' '-v' 'geronimo-stax-api_1.0_spec-1.0.jar'
    The following operations failed
    resource META-INF/MANIFEST.MF: creation (createFailed)
    class javax/xml/stream/EventFilter: resolution
    class javax/xml/stream/events/Attribute: resolution
    class javax/xml/stream/events/Characters: resolution
    class javax/xml/stream/events/Comment: resolution
    class javax/xml/stream/events/DTD: resolution
    class javax/xml/stream/events/EndDocument: resolution
    class javax/xml/stream/events/EndElement: resolution
    class javax/xml/stream/events/EntityDeclaration: resolution
    class javax/xml/stream/events/EntityReference: resolution
    class javax/xml/stream/events/Namespace: resolution
    class javax/xml/stream/events/NotationDeclaration: resolution
    class javax/xml/stream/events/ProcessingInstruction: resolution
    class javax/xml/stream/events/StartDocument: resolution
    class javax/xml/stream/events/StartElement: resolution
    class javax/xml/stream/events/XMLEvent: resolution
    class javax/xml/stream/StreamFilter: resolution
    class javax/xml/stream/util/EventReaderDelegate: resolution
    class javax/xml/stream/util/StreamReaderDelegate: resolution
    class javax/xml/stream/util/XMLEventAllocator: resolution
    class javax/xml/stream/util/XMLEventConsumer: resolution
    class javax/xml/stream/XMLEventFactory: resolution
    class javax/xml/stream/XMLEventReader: resolution
    class javax/xml/stream/XMLEventWriter: resolution
    class javax/xml/stream/XMLInputFactory: resolution
    class javax/xml/stream/XMLOutputFactory: resolution
    class javax/xml/stream/XMLStreamReader: resolution
    resource META-INF/LICENSE.txt: creation (createFailed)
    resource META-INF/NOTICE.txt: creation (createFailed)
    It seems to me that the root of the problem is the error:
    ORA-29521: referenced name javax/xml/namespace/QName could not be found
    This class exists in the SYS schema though and is valid. If SYS should be included as a resolver? How to solve this problem?

  • Urgent help needed on oracle queueing

    Hi
    we have created AQ tables and queues but are facing with the following errors
    Thu Aug 30 17:25:31 2007
    Errors in file e:\orant\ora9i\pds\udump\pds_ora_4092.trc:
    ORA-00600: internal error code, arguments: [opidor: call 1], [], [], [], [], [], [], []
    Thu Aug 30 17:44:17 2007
    Errors in file e:\orant\ora9i\pds\udump\pds_ora_4092.trc:
    ORA-00600: internal error code, arguments: [17281], [1001], [0x25EBB628], [], [], [], [], []
    ORA-01001: invalid cursor
    Thu Aug 30 17:44:17 2007
    Errors in file e:\orant\ora9i\pds\udump\pds_ora_4092.trc:
    ORA-00600: internal error code, arguments: [17281], [1001], [0x25EBB628], [], [], [], [], []
    ORA-01001: invalid cursor
    ORA-00600: internal error code, arguments: [17281], [1001], [0x25EBB628], [], [], [], [], []
    ORA-01001: invalid cursor
    help needed asap
    thanx

    ORA-600 should be reported to Oracle support with trace files and alertlog.
    Well the following note may help you:
    Note: 433389.1
    Hope this Helps
    Regards

  • Instructions needed for importing a RoboHelp - Oracle Help file

    Please provide instructions for importing a RoboHelp, Oracle Help file into an Oracle 8 software application.
    Thank you,
    Jennifer Byrne

    The Oracle Help Guide documents how to program applications to support Oracle Help. Have you looked at it? The Guide is included with the downloads of Oracle Help for Java (OHJ) and Oracle Help for the Web (OHW) and you can also find it directly on OTN at http://otn.oracle.com/docs/tech/java/help/content.html.
    But I'm not sure I understand your question completely. What do you mean by "import" the help into the application? I assume you are referring to programming the application to integrate the help into it; hence my suggestion to refer to the Oracle Help Guide, above. But perhaps I'm missing something. Also, what kind of application do you have? Is it a Java application?
    Ben Gelernter
    Oracle Help Technologies

  • Transpose in oracle 10g

    I am having situation in my project in which I need to transpose the data, means need to display all rows to column.
    Please asap help me on this.
    Thanks in advance
    Anup

    888679 wrote:
    Thanks for your response, but Pivot present in 11+ & I am using 10gWell, the 2nd link in the FAQ indicated by Karthick_Arp is :
    [url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:766825833740]Tom Kyte - Pivoting pre-11g
    Pre-11g meaning 10g or less....

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Help needed in Finding Download location for Sun One Portal 7

    Hi,
    help needed for finding download location for Sun ONE Portal 7. I tried to find in Oracle Download page ,
    http://www.oracle.com/us/sun/sun-products-map-075562.html, But unable to find.
    Please share the link for download location.
    I am totally new in Sun ONE Portal.
    Thanks,
    Edited by: 945439 on Oct 5, 2012 3:41 AM

    try edelivery.oracle.com under sun products.

  • Help needed

    Help needed
    1. When we use USING clause in execute immediate does it hard parse ?
    2. Is it better to use values stored in SYS_CONTEXT or to use USING clause in Execute Immediate ?
    3. In Dynamic SQL, if i use SYS_CONTEXT does it Hard Parse or Soft Parse ?
    Edited by: Prathamesh on Jun 22, 2010 5:19 AM

    Prathamesh wrote:
    1. When we use USING clause in execute immediate does it hard parse ?Only the first time.
    2. Is it better to use values stored in SYS_CONTEXT or to use USING clause in Execute Immediate ?I think it depends, Tom would say the latter
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1669972300346534908
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1288401763279

  • Urgent help needed; Database shutdown issues.

    Urgent help needed; Database shutdown issues.
    Hi all,
    I am trying to shutdown my SAP database and am facing the issues below, can someone please suggest how I can go about resolving this issue and restart the database?
    SQL> shutdown immediate
    ORA-24324: service handle not initialized
    ORA-24323: value not allowed
    ORA-01089: immediate shutdown in progress - no operations are permitted
    SQL> shutdown abort
    ORA-01031: insufficient privileges
    Thanks and regards,
    Iqbal

    Hi,
    check SAP Note 700548 - FAQ: Oracle authorizations
    also check Note 834917 - Oracle Database 10g: New database role SAPCONN
    regards,
    kaushal

  • Help needed in setting up Japanese Database

    Hi there,
    Help needed in setting up Japanese Database.
    I created database with UTF8 character set on Sun Solaris O/S.
    Oracle version 8.1.7.
    I am accessing the DB through SQL*Plus (Windows client).
    I downloaded the Japanese font on client side and also set the NLS_LANG environment variable to Japanese_Japan.UTF8. Still, I am not able to view Japanese characters. O/S on client side is Windows 2000 professional (English). Is O/S (client) need to be Japanese O/S? When I try to retrieve sysdate, its displaying in Japanese but not all characters in Japanese. Can anyone help me out how to set up the client and is there any parameters to be setup at server side? I also tried to insert japanese characters into table through client, but it displaying as "?????" characters. Any help in this regard is appreciated.
    Thanks in advance,
    -Shankar

    lol
    your program is working just fine.
    do you know what accept does? if not read below.
    serversocket.accept() is where java stops and waits for a (client)socket to connect to it.
    only after a socket has connected wil the program continue.
    try putting the accept() in its own little thread and let it wait there while your program continues in another thread

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Oracle Help in RH8, not working as it did before

    We're building Oracle Help in Robohelp & recently
    upgraded to RH8. When I delivered the files to our dev team, the
    files won't work. This is what our dev person wrote to me:
    When I try to load the Oracle Help I get the following error
    message:
    oracle.help.library.helpset.HelpSetParseException: Unknown
    error when parsing hs file: No toplevel tag in helpset file
    I looked at the helpset file and didn’t see anything
    different except the first line was changed
    from: <?xml version='1.0' ?>
    to: <?xml version='1.0' encoding='UTF-8' ?>
    I have no idea what this means or what I'm supposed to do.
    Obviously something changed in RH8 that affects the build but I
    have no idea what our dev team is supposed to do to make it work.
    Any suggestions?
    Thanks! Cindy

    when you generated the Oracle Help from RH8, were you able to
    view the help on your system. I tried generating Oracle Help on my
    RH8 Machine and was able to view the Oracle Help, with out any
    error.
    you need to specify the encoding type to utf-8 while calling
    the java compiler command.
    -Dfile.encoding=UTF8
    you can check the command line used by RH8, I am pasting the
    command sent by RH8 to open the oracle help in correct encoding
    type. you can forward the command line to your developer.
    java -Dfile.encoding=UTF8 -classpath
    C:\PROGRA~1\ohelp\help-4_2-ehelp-integration.jar;C:\PROGRA~1\ohelp\help4-demo.jar;C:\PROG RA~1\ohelp\help4-indexer.jar;C:\PROGRA~1\ohelp\help4-nls.jar;C:\PROGRA~1\ohelp\help4-rsrc. zip;C:\PROGRA~1\ohelp\help4-viewer.jar;C:\PROGRA~1\ohelp\help4.jar;C:\PROGRA~1\ohelp\ohj-j ewt.jar;C:\PROGRA~1\ohelp\oracle_ice.jar;C:\PROGRA~1\Adobe\ADOBER~1\RoboHTML\ORACLE~1\bssc ohrs.jar;
    HelpLauncher -helpset "C:\Users\praful.ADOBENET\Documents\My
    RoboHelp Projects\asdsadsad\!SSL!\Oracle_Help\asdsadsad.hs"
    Hope this will help you.
    -Praful
    Adobe RoboHelp Team.

  • How to use Oracle Help in developer 10g

    Hi!
    First i'm sorry for my bad english
    I'm a student in computer science and i have a projet to make with Developer 10g. My teacher want us to make a Help file for the user but he don't know how to do it with developer 10g.
    So i've made some research on internet and i found how to create my help file. I have downloaded Oracle Help and RoboHelp.
    Using RoboHelp i've create my help file and then i generate it in Oracle Help format. I generate it in a compressed and a uncompressed version(because didn't know which one i need). So now i have two folder one who containt a .jar file and another who containt a lot of files.
    What i want to know is how to execute my Oracle Help in a WHEN-BUTTON-PRESSED trigger with theses files.
    Thank and sorry for my bad english

    Hi Pierre,
    Showing an appropriate help topic when a "Help" button is pressed in an application or when the user presses the F1 key is what we call "context-sensitive help".
    In your Oracle Help help system there is an XML map file that contains topic-ids that map to help topics. You need to associate these topic-ids with your user interface (help button, etc).
    Is your project an extension to JDeveloper 10g, or are you just creating a Java application using JDeveloper? If you are just using JDeveloper to create your own Java application, then you can use the CSHManager class distributed with Oracle Help for Java to enable context-sensitive help (see the Oracle Help Guide documentation). If you are creating an extension to JDeveloper, then let me know and I'll give you information on how to set up help in that context.

Maybe you are looking for

  • Can´t copy vector from Illustrator to Edge Animate

    In the newest version this should be a function, but nothing happens for me when I copy the object in Illustrator and try to paste it in Edge Animate. Any help? Another question would be why the filters are even among the tools in Edge when they don´

  • Time stamp for each DML in spool file

    Hi, I need to know how much time is taking for each delete statement in sql file. this is my sql file with dml statements. set serveroutput on; set time on; spool C:\PN\PN\temp_spool.log delete from tmp_test1; commit; delete from tmp_test21; commit;

  • Drag and drop interaction not previewing

    I have a drag and drop question within my project and when I try to preview it or publish the next 5 slides it doesn't work...blank screen while it tries to load. Please help.

  • Photoshop 11 can't find exe. file after re-install.

    After a computer crash i had to reinstall Photoshop Elementnts 11 again with no success. Downloaded again . Shortcut can't find the exe. file on my computer. Tried numerous times and the result is still the same. Setup says program loaded correctly b

  • HT1918 How i can change my country to download item

    I can not dowload enything Its saying you should change your country to download