Doubt in view

i have table transaction with column transaction_time.
i want to create view for split the transaction_time column into 24 columns.i tried like this
create or replace view calender_view as select
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 1 and 2)one,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 2 and 3)two,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 3 and 4)three,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 4 and 5)four,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 5 and 6)five,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 6 and 7)six,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 7 and 8)seven,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 8 and 9)eight,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 9 and 10)nine,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 10 and 11)ten,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 11 and 12)eleven,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 12 and 13)twelve,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 13 and 14)thirteen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 14 and 15)fourteen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 15 and 16)fifteen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 16 and 17)sixteen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 17 and 18)seventeen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 18 and 19)eighteen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 19 and 20)ninteen,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 201 and 21)twenty,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 21 and 22)twentyone,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 22 and 23)twentytwo,
(select et_start_time from event_transaction where substr(et_start_time,1,2) between 23 and 24)twentythree
from event_transaction
View created.
SQL> select * from calender_view;
select * from calender_view
ERROR at line 1:
ORA-01427: single-row subquery returns more than one row
How to solve this problem.

i have table transaction with column
transaction_time.
i want to create view for split the transaction_time
column into 24 columns.i tried like this
create or replace view calender_view as select
(select et_start_time from event_transaction where
substr(et_start_time,1,2) between 1 and 2)one,
(select et_start_time from event_transaction where
substr(et_start_time,1,2) between 2 and 3)two,
(select et_start_time from event_transaction where
substr(et_start_time,1,2) between 3 and 4)three,
(select et_start_time from event_transaction where
substr(et_start_time,1,2) between 4 and 5)four,
I see a beginning of a coding nightmare here.
Can you give us a description of your table (i.e column definition) and some sample data and what you wish to accomplish ? This can be easily rewritten with those info.

Similar Messages

  • Urgent ....Doubt on Views in ORACLE

    hai,
    i am learner...
    can we pass parameters in Views just like Procedures and Functions.
    regards
    madhava

    No, here you can read more:
    http://www.oracle.com/pls/tahiti/tahiti.tabbed?section=73973

  • Doubt regarding View

    Hello,
    Can we write a Cursor or a LOOP in a View...

    No, views are just a named sql query, which can be used in SELECT statement. Cursor can reside only in pl/sql block, so its not possible in view definition

  • Doubt on views

    i have 2 tables to join and create a generic ds out of it. 1 table is a transparent one and another one is a pooled one. if i want to create a generic ds using views would i be able to do or is there any restriction that views can only be created on transparent tables.

    Sorry I didn't answer that part of the question.
    Performance is in my experience low for datasource based on ABAP Queries. Performance for datasources build on function modules and tables/views is ok.
    /Christian Frier

  • Doubt on viewing service message reply from solution manager???

    Hi,
    How to view the reply(for Service Message) from solution manager in our satillite system? or how to view the reply for our service message? Please share your ideas..

    Hello Sriram,
    Unfortunately it is not possible to display the replies of the support
    desk in any satellite system. There are to ways to inform the creator
    the message:
    A new action can be defined, so that a mail is sent to the creator, when
    e.g. the status of the message changes. You can read in attached note
    no. 691303 how to set up an action triggered by status change.
    The second possibility is to set up a user in the Solution Manager
    system with display authorization, then creator of the message must log
    on to the Solution Manager system and can then have his messages
    displayed.
    At the moment there are no other possibilities for the issue described
    by you.
    Hope this helps,
    Dolores

  • PDF printing with UTF8 characterset

    Hi,
    Stats:
    E-BIZ version :- 11.5.10.2
    DB:- 10.2.0.3
    Report BUilder :- 6i
    Character Set :- UTF8.
    I have some doubt while viewing/printing pdf reports from Oralce Application. Can you please suggest if it is possible to print pdf's from oracle apps with UTF8 characterset and without having 3rd party software to convert pdf report to postscript and a printer that can understand postscript. We do have PASTA and IX configured in our enviornment.Reports created are in BI/XML publisher.
    Actually we have one 3rd party tool for printing and wanted to get rid of it due to financial constraints. Can you please suggest if it is possible to print pdf's from oracle apps without having 3rd party tool. I have read lot of document and completely lost. Oracle some where says it is possible and at other place says 'If you are on UTF8 chacterset then you need to have XML/BI publisher with PASTA and 3rd party software' but in my enviornment we have some pdf reports that are bypassing 3rd party software for printing. I am just lost.
    Any help would be appreciated
    Thanks,
    JD

    Hi,
    This line confuses me, do i require 3rd party software to print from oracle apps if my characterset is UTF8(althoug i am using XML publisher), I believe yes -- See (Note: 422508.1 - About Oracle XML Publisher Release 5.6.3), Step 8 Enable PDF Printing in Oracle Applications. (System Administrator)
    Workaround section says
    6. From Oracle Applications via the Adobe Acrobat Reader, a PDF output file can be viewed and
    printed.>>>> NO i not want to use it.This is a workaround to print PDF directly from the application. If you do not want to use this approach, use the other one mentioned above.
    7.Although, it may be possible to create a custom print driver or print program using the Adobe
    Acrobat Distiller, viable instructions on how to perform such a custom setup is very scarce, see
    Note 262657.1--intended for Latin 1 character set environments.>>>> I am on UTF8
    I would not recommend this approach as this may (or may not) work.
    8. Use Pasta, an Oracle post printing program, to change a copy of the report output file to the
    desired or printable output format.>>>>>> I have PASTA but does that mean i can print all my pdf reports using it. Don't i need 3rd party tool now.See (Note: 239196.1 - PASTA 3.0 Release Information).
    9. Lastly, use another format like Postscript, that is fully supported for viewing and printing>>>>> How to use it? Can anyone please explain.Change the output of the concurrent program to Postscript (Concurrent > Program > Define), and you can view the output using Ghost Viewer.
    Note: 117112.1 - How to read Postscript File Formats on a MS Windows Operating System and Convert To Another File Format
    Thanks,
    Hussein

  • Problem in service desk

    Hi All,
    I have configured service desk in my solution manager system. And the service message sent from satillite system are reaching solution manager. Now my doubt is, how to view the reply sent from solution manager? is there any Transaction code to view that reply? Please help me in this....

    Hello Alex,
    Please see Doubt on viewing service message reply from solution manager???
    Best regards,
    Dolores

  • Need some help- 4G with no static IP

    Why is 4G your only option?
    What is it that you're trying to do here?

    Gary D Williams wrote:jackteller wrote:i dont see why the camera's are the issue- 4G is my problem- at is the only coverage option.
    Agreed. It's the wrong technology for this sort of of access. Even a DSL line would be better.absolutely but dont have DSL - not an optionRod-IT wrote:jackteller wrote:the vendor does not offer static IP or port forwarding- i have been told it simply will not work on other forums without these.
    If the vendor does not offer static IP or port forwarding how was you ever expecting it to work?As for other forums telling you it won't work - it sounds like your doubting their views.As Rockn said, you need real IP cameras for this to do what you want.what are these "real IP Camera's", and i was hoping there was some solutions - the camera's were cheap and i got them for testing - other forums mention 4G with CCTV...

  • Bought a New Lumia 800 - But Dec 2011 packaging

    Hi friends bought a Lumia 800, but got a Dec' 11 packaging instead?
    Can I go ahead and accept it? I know I will have to apply fixes, upgrades from scratch, I am ready to do that just that will Nokia honor me warranty upto 22nd July 2012 given that I bought it on 23rd of July 2012?
    And one more concern, I need to apply the Battery fix but I guess phone's software will select latest update of June 2012, skipping Jan/Feb battery fix, which I need anyways? How can I do it?
    These are my whole concerns as of now.
    Thank you
    Shashank

    On the contrary, India is an important market for Nokia, so I very much doubt Nokia views Indians with any contempt at all.
    Who told you there was a "no refund" policy?
    Regardless of refunds, your phone is still well within the warranty period and you are entitled to the same service as anyone else in any other country. For what it's worth, you wouldn't get a refund here in the UK or anywhere else in Europe after 2 months either, so it's nothing to do with the fact that you're in India.
    Have you actually tried to get the phone repaired? If so and it wasn't repaired to your satisfaction, did you take the matter up with Nokia Care in your country?
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

  • Doubt in attribute view on joining the table .

    Hello Team
                        Can some please help me in clearing the following doubts on joining tables .
    i) Can we perform a self join in attribute view in HANA . like for ex :- joining a table to itself .
    ii)Can we create an analytic view without creating an attribute view i.e creating an analytic view directly on tables .
    iii)When aggregation happens in calculation view exactly what happens internally .
    Please suggest me with the solution of these doubts .
    Regards

    Hi Prag,
    As Rashmi has answered your question, i would like to add up to it few more important points.
    1. Do not perform self join as it will return uncertain results. It is better to avoid self join.
    You can create a copy of the same table and perform join which will be consistent.
    2. In an analytic view, you will be adding table to data foundation, select the output fields.In the logical join node by default your data foundation will be present (this will contain the fields that you selected for output), you need not add any attribute view to this logical join node, leave it to default. In the semantics node select the attributes and measures. Perform validation and then activate. Your analytic view without attribute view is ready. You can check the data preview.
    3. In a calculation view, the records gets grouped by all the attributes and then the measures are calculated based on this grouping by using the mentioned aggregation (sum/max/min).
    Eg.
    Customer ID 0Calmonth Amount (aggregation = max)
    1001               01.2014     100         
    1001               01.2014     400
    1002               01.2014     200
    Output:
    Customer ID 0Calmonth Amount (aggregation = max)
    1001               01.2014     400
    1002               01.2014     200
    Hope this clarifies your doubts.
    Thanks and Regards,
    M.N.Adinarayanan

  • Doubt about Tunning View Objects

    Hi !. I have the following doubt about tunning View Objects:
    If I have the following configuration on a VO:
    All Rows
    In Batches Of: 11
    As Needed
    Access Mode: Scrollable
    Range Size: 10
    Total Records On The Table: More than 100
    What would happen is that while the initial render, the view cache is fetch with 11 rows from the table and the ui table shows 10. In subsequent scroll events, more queries again will be done but not when the user scrolls back. My doubt is this one: Why, while the initial render If I put a breakpoint in this overrided method executeQueryForCollection, the execution reachs there but in subsequent scroll events (forward) the execution doesn't reach there ?. I understand thast this should happen as the required rows are not yet in the cache. I would like to know a way to test this access mode and what method is executed in every roundtrip to the DB. Thankx !.

    I don't think ADF needs to execute the query again - it just needs to fetch the next set of records.
    So if the cursor is already open, no need to issue another query.
    You can use the HTTP Analyzer to watch network traffic
    Monitoring ADF Pages Round-Trips with the HTTP Analyzer
    And you can use the logging features of ADF to see the queries being executed.
    Declarative View Objects (VOs) for better ADF performance

  • Sql View Doubt

    Hi all...
    I am beginner of oracle sql 10g and also trainee.. i know why v r using views but im getting confused to use views bcoz im little weak to understand in english.. i have one doubt is it possible to use views in same table? can any one tell me?
    Thankz

    Think of a view as a stored query. A view can be created by querying one table or from a complex query joining many tables. But the end-user just sees the result, which looks like a table of rows to them. Generally you aren't trying to hide implementation but either hide sensitive data or filter unimportant data. For instance, let's say you have an employee table that has all sorts of information about an employee. Some of that information is sensitive (like their salary, any medical information, etc.). Other information (e.g., what department they work in, who their manager is) is not sensitive. If all that information is in one table but you want to hide the salary information from everyone but the HR dept., then you could make a view that selects the non-sensitive columns from the employee table and only grant select on that view to non-HR personnel. If you wanted managers only to have access to certain data in the employee table for employees that they manage, you could make a view for that as well.

  • Doubts related to views urgent help needed

    Hi all ,
    i am new to oracle technology and have a doubt related to VIEWS
    i have a master table job_master and i have preapred a view of the master table as
    job_master_view
    The view i created as create view job_master_view as select * from job_master
    Now my doubt is if i exevute a SELECT FOR UPDATE NOWAIT query on the view job_master_view then will corresponding row of the master table also be locked
    I am trying to execute above query to avoid simultaneous access by multiple users
    I the above approach correct ? and will the row of master table get locked ?
    please let me know in case my query is not clear
    Thanking in advance
    Regards

    My question is, how long you are going to hold lock on these table? If not, you can only use select for update with requried records using where cluase. I also suggest other application which updates this table to use same kind of statement, with NOWAIT caluse, when these applicationg trying to get a lock on these records and found already locked my other, it wont block or wait, just statement fails and can be re-tried again.
    Bascially triggers are used for sort of action not for selecting data. What you can do is that develop a procedure and call it in the trigger and in the procedure you can easily use dbms_outout.put_line to display output on the sqlprompt.
    Jaffar

  • Doubt in  Fetching data from a View

    Hi all,
    I want a data from a view  v_tvko.How to use a view in program for  fetching data from that.
    Please help.
    Thanks in advance.
    Nithin.

    Hi Nitin,
    We can't directly refer a view to get data.
    We need to refer the tables using which a view has been created.
    Using those tables, we can fetch the data as per our requirement.
    For suppose, if you go to a view in SE11, then click on Tables tab, there you can get the reference tables.Then you need to check for the fileld in those tables for which you require the data.
    Post the query directly on the table instead of view.
    Hope this will help you.
    Regards,
    Anand.

  • View's In Oracle - Performance Issues -some doubts

    Hi,
    "I have some tables with names T_SRI_MMYYYY in my database.
    I created a view ,Say "Summary_View" for all the table names
    with "T_SRI_%".
    Now i want to select data from all the tables in the view
    Summary_View.
    How can i do that ? Please throw some light on the same?
    Thanks and Regards
    Srinivas Chebolu

    I've got no idea what this has to do with the subject you
    posted. But you can do this:
    spool alltabs.sql
    SELECT 'select * from '||table_name||';'
    FROM summary_views
    spool off
    and then from sql*Plus just run @alltabs
    If you want to do this in PL/SQL you'll have to do something
    fancy with EXECUTE IMMEDIATE.
    Regards, APC

Maybe you are looking for

  • 2 identical macbook pro with mountain lion osx 10.8.1...one is fast and one is slow

    Helllo. I am a new user with mac, and i have purchased two macbook pro and both of them have the same application and programs! the one is fast like a rocket, and the other one is very slow! Even when i want to open finder, i have to wait 5-10 second

  • Is there a way to create a group function?

    I want to create a group function like max,sum,count for a pl/sgl function. This group function will be something like max (let's call it max2) but it will return the second highest value of a group. Any ideas anyone?

  • HtmlLoader and swf alignment

    Hello! I'm using adobe air 1.5, i created an htmlLoader that resizes with the stage as well, the problem is when the user visits websites with flash content like youtube, the swfs move to the origin of the htmlloader instead of its own place in the h

  • How to upgdare my N95 to the latest Firmware ? hel...

    hello I have a Nokia N95 v11.0.026 And i want to upgrade it to the latest Firmware . Please can you tell what what is the last one + how to update my phone ? Thank you all

  • How do I search for and remove empty folders?

    I would love any help. I've spent about 6 hours yesterday looking for a solution for this project... PROBLEM: I'm trying to organize a 6GB file library of sheet music documents. After using Gemini to find and delete duplicate files, I'm left with hun