question about a view that I have created to solve performance problems

Dear alll;

I have an interesting problem. I created a view to help solve some performance problems, I've had with my query

See below
create or replace view view_test as 

Select trunc(c.close_date, 'YYYY-MM-DD') as close_date, t.names
from tbl_component c, tbl_joborder t
where c.t_id = t.p_id
and c.type = 'C'
group by trunc(c.close_date, 'YYYY-MM-DD'), t.names
;
and I tried test the view using the following syntax and I get the following errors
select k.close_date, k.names from view_test k
where k.names = 'Kay'
and k.close_date between to_date('2010-01-01', 'YYYY-MM-DD') and to_date('2010-12-31', 'YYYY-MM-DD')
However, I get the below error messages
ora-o1898: too many precision specifiers
I Googled it and tried a lot of things online but I can't solve the problem unfortunately, and I don't know why.



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

What you trying to accomplish with TRUNC:

SQL> select trunc(sysdate, 'YYYY-MM-DD') from dual;
select trunc(sysdate, 'YYYY-MM-DD') from dual
                      *
ERROR at line 1:
ORA-01898: too many precision specifiers

I think you meant simply TRUNC (c.close_date)

Tags: Database

Similar Questions

  • Hi there, I have a question about storage, even if I have 2, 53GB, storage watch 21, 99GB usage, why this difference? I use an iMac 2009, thank you!

    Hi there, I have a question about storage, even if I have 2, 53GB, storage watch 21, 99GB usage, why this difference? I use an iMac 2009, thank you!

    Spotlight re-indexing.

  • Question about LogMiner Viewer GUI

    Good evening

    I wanted to start the graphical interface of LogMiner Viewer (which the Concepts book said done in Enterprise Manager).

    I found nothing in Enterprise Manager, who seemed to be the LogMiner Viewer GUI. (might have missed)

    After a little research on Google, I found this:
    oemapp.bat lmviewer
    I've looked everywhere and there is no oemapp.bat anywhere on my machine.

    I searched the area to download Oracle, thinking that maybe it was something that I needed to download. Has not found such a thing. (found a lot of good documentation)

    The question: How can I get the LogMiner Viewer GUI? (I am running Windows XP Pro SP2 - 32-bit Oracle GR 11, 2)

    Thank you for your help,

    John.

    Published by: 440bx - 11 GR 2 on August 9, 2010 18:38 - added "GUI viewer" in the thread title

    John,

    Unfortunately, it's a little confusing. I have check the Concepts guide that asks the person to consult the guide for LogMiner Utlities. But in the guide to public services, they mention this sql interface only one graphical interface is not displayed. In the search for the RTO, all the Log Miner, this brilliant page will appear that except by saying that it is good and can be called through GUI, does not say anything else.
    http://www.Oracle.com/technetwork/database/features/availability/logmineroverview-088844.html

    I tried to find the same in Enterprise Manager help, but he also didn't tell em anything on this subject. But further research has revealed that Arup article that does not explain the flow of Logminer in EM.
    http://www.Oracle.com/technetwork/articles/SQL/11g-transactionmanagement-092065.html

    According to this article, there is no direct link to call the tool, but it happens in action in the backend. I'll give it a try today while I am running 11.2 here in my session as well.

    It will be useful.

    Aman...

  • Question about the type of database, we create.

    Dear gurus,

    We create an application where Back-end is the Oracle 10 g 2 database and UI is Java.

    Let me explain what we intend to do on the side of the DB. (Say that the name of our DB is NPS)

    1. we intend to have a single database, and it contains 2 diagrams. There is a scheme and any other scheme of Transaction.

    The schema of the transaction contains tables and these data tables is filled on a daily basis and this is achieved from a different database (Say NP).
    If the database transaction will get data from the NP. That is to say NP-> NPS (Transaction).

    Note: The data can be loaded into our tables in the schema of the Transaction once in the day.

    2. we need to show these data to users. This user interface is created using Java.
    Now, we got a lot of users (waiting 600) hitting the daily application, at any time in a day.

    So, we plan to go for Reporting scheme. For the schema of the transaction will be just be fetch data from the database.

    The Reporting schema contains a few warehouse tables that are there in the scheme of the transaction.

    Our notification dashboards should get the data from our data of Transaction so it has to be updated periodically since the schema of the Transaction for any new data that we get from the other database.

    Can someone explain to me what is the best way to do it.
    Is there a better approach than what I explained.

    Thank you
    Maddy.

    Based on what you have posted, I can make the following observations and recommendations.

    1. 600 users not there. Amazon.com has 300 000. 15 + years I had an Oracle 7.3.4 database with more than 10,000.
    2. nothing you wrote never justifies the second schema that contains duplicate data... there just need to SELECT on the schema of the first privileges.
    3. 10 gr 2 penetrates support mode in just a few months. Why build something today that will be obsolete this summer? Go to 11 GR 2.
    4. learn... materialized views they might have some value according to works of your load.
    5. Java is not a reporting tool. Why not get a writer true Crystal, Business Objects, Oracle BI Publisher, discoverer or Siebel Analytics report?

  • I have a few questions about HTML5 Canvas that needs answer

    I intend to start developing games using Flash Pro CC soon and recently discovered on the feature of HTML5 Canvas. It's quite new to m, so I was curious to know certain things.

    1. What is the HTML5 Canvas and is commonly used to make games?

    2 should. what kind of code I use? (from my understanding, he uses Javascript)

    3 can be used to create complex games, let's say something like a Tower Defense, shooting or even multiplayer?

    4. the good tutorials on using the HTML5 Canvas game development? (preferably written)

    Thank you

    1. the HTML5 Canvas is the HTML5 Canvas. Flash uses an embedded CreateJS library version to handle it.

    2. it runs in the browser client-side then Yes, it uses JavaScript.

    3. of course, it can be used to create complex and multiplayer programs. Already used Google Maps? Google Docs? Those are all programmed in JavaScript.

    4 game in development is a subset of the programming. If you don't know JavaScript, then browse through thousands of tutorials available online.

  • Questions about VMware View

    Hi, I need to provide always on desktops to remote 50 users. I have been using VMware workstation to provide these desktop computers, but it was a temporary solution that is quick and easy.

    I started by installing the free ESXi which works fine except that these virtual machines are running an application that requires DirectX. When reading information VMware views looks like it's maybe the solution I need, but I can't say if she can provide always on workstations or if desktop computers are provided according to the needs. My 2nd concern is cost. I don't mind spending the money for VMware View, but looks like I have to have seen running in AD and that it will require me to install many other products such as VMware infrastructure 3.5. Someone has some good links to install VMware View and the provisioning of desktops?

    When you purchase View 4.5, business or first, you get ESX and vSphere vCenter / I.  If you are supported on this part.  You don't need to buy that separately.

    With respect to reviews, the guides are:

    To start using the doc started get: http://pubs.vmware.com/view45/ol/wwhelp/wwhimpl/js/html/wwhelp.htm#href=get_started/t_getstarted.html

    http://www.VMware.com/files/PDF/VMware-View45-evaluators-Guide.PDF -> is excellent for your POC on VMWare View.

    http://www.vmware.com/pdf/view45_installation_guide.pdf -> installation guide.

    You will need to have Active Directory in your environment.  View is used to automatically configure your desktop to your users.

    If you use clones of link or local mode (the ability to check your workstations), then you will need to Prime Minister, Enterprise edition will be beneficial.

    Hope this helps,

    Larry

  • Questions about the views system...

    Hello

    (1) why this 2 queries are not similar?

    Select count (*) from SAMPLE_TABLE;
    Select num_rows from user_all_tables where table_name = 'SAMPLE_TABLE. "

    (2) in the views system, I can learn about primary piece?

    (3) where I can the description of each of the views system and what information it contain?

    Best.

    (a) the statistics in views because _TABLES are only updated when you calculate freshly statistics, while the number of rows in a table established by count (*) is dynamic and always up-to-date.
    (b) what do you know about primary keys? The columns that make up their, for example? USER_CONSTRAINTS where constraint_type = 'P' will tell you what primary key constraints exist and the indexes are used to enforce them. You can then do a query of USER_INDEXES and USER_IND_COLUMNS to work on the columns are part of these indices, where they are stored and so on.
    (c) the official documentation lists each view (see part II of this page, for example: http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm)

  • a question about VMware View

    Hello

    I want to know when we prepare a parent VM and install us one application on which allowed as Kaspersky endpoint security or other, what is happening with this when the composer creates the linked clones? How the linked clones take permit?

    and if the virtual machine is not persistent (I mean whenever a client connects to it, she creates, and every time it disconnects the virtual machine will be deleted) then what happens to software with license? and what about the name of the computer? and what is being added to the Active directory?

    Thank you

    Thank you Mohammed.

    applications there volume licenses? What is the difference between the volume licensing and standard license and how do we get it?

    Thanks again

    My best regards

  • A question about bluetooth technology, apparently I have, but it doesn't show signs of availability

    I contacted HP through the option of the complaint, this isn't really a complaint, just understand... The response to the complaint was "while they inspected here in my end, your order of HP TouchSmart tm2t customizable notebook PC has been configured with 802.11b/g/n WLAN and Bluetooth (r) so basically, your PC has bluetooth capability"

    I don't understand what they mean by ability, all computers have bluetooth, Bluetooth installed capacity or not?   I went to device for signs of bluetooth Manager, I find nothing, the PPF assistant wireless also shows nothing. I talked to a representative directly through instant messaging, they gave me the Web page to download the drivers. I downloaded the drivers, when I tried to install the drivers, he said "turn on bluetooth" I can't activate it if I can not find...

    SO I need help with this, any help is appreciated.

    well, Yes, I am excited, he has spent 12%, took about 6 and a half hours (literally) but the recovery of the tie is almost finished.

  • Question about Get-View

    Note:

    I use () instead of media because this page don't like the media.

    Hello

    For some reason when I use the following code:

    Get - VM | Get-View | % {

    $_. CustomFields ("Barcode")

    I get a cannot index into a table null error.

    But... If I use this code:

    $Vms = get - VM

    {foreach ($vm to $vms)

    $Vm.CustomFields ("Barcode")

    }

    It takes more time, but it works without error.

    Does anyone know why this is? Is there a known issue with the cmdlet Get-view?

    Thank you

    Looking to 2 things different here.

    The Get - Vm cmdlet returns a VirtualMachineImpl object that contains the CustomFields property.

    Get - VM | Get-views as you watch a VirtualMachine object that has a property customValue (but no CustomFields property).

  • Question about a query that will be 1 for the first 10 lines, 2 for the

    Hi all

    I am trying to write a query that will be 1 for the first 10 lines, 2 for the next ten lines and so on.

    I tried several approaches such as mod, rank, case but could not get the correct idea.

    Grateful if someone can give me a hint on this one.

    Ex:

    Col1 Col2
    1 989
    1 120
    1 876
    2 121
    2 456
    2 87
    1 of 3
    3 22
    3 333
    ....................... and so on..


    Thank you
    MK.

    How about this:

    His past all my tests so far

    select trunc((rownum - mod(rownum-1,10))/10)+1
    from dual
    connect by level <= 1000
    
  • Question about a bug that should be fixed in the 10.2.0.4 group patch

    Hello

    We have a 10.2.0.4 single instance of database on Sun Solaris SPARC (64-bit) and have the same symptoms as described in Bug 4643723 (error codes and the trace of the stack are the same). This bug should be fixed already in 10.2.0.4 patches group.

    Someone of experience on how to proceed in this case - I mean, did a SR on metalink an obvious action?

    Is it possible that fixes group has not been applied correctly, even if "opatch lsinventory" outputs that the "group of patches 2 3 (10.2.0.4) version 10g ' is installed and SYS. HISTORY of $ REGISTRY also contains an account of the upgrade. The upgrade of 10.2.0.1 10.2.0.4 was made 6 months ago and the data base has been continuously top and runing so far here.

    Thanks for all the answers

    many bugs may have the same mistakes. Raise a SR.

    Support Oracle ask a lsinventory opatch you and may request you check the versions of libraries, or reissue.

  • Question about a view inline or function within SQL

    Hi all


    I would like to know if using a view inline with a sql query is better or a call of function within the sql query is preferable.

    When I check the plan explained in both cases I see no difference in the cost.

    Appreciate your valuable suggestions on this.


    Thank you
    Maddy K.

    A function of a query will be worse than an inline view, given the context of switching between SQL and PL/SQL engines.

    See http://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:60122715103602
    Bonus http://www.oracle.com/technetwork/database/features/plsql/overview/doing-sql-from-plsql-129775.pdf

  • Question General on what work you have created.

    If I took a picture online, say a cat. Then I used the trace function and then went to the object - expand and changed the color. that would qualify as my design? And I want to say is that would qualify as something that you could sell and call your design. (As if you sold it as a logo).

    I can easily use the pen tool to draw any image, but I find that this option allows to save an impressive amount of time.

    So your answer is no! It doesn't matter how copy you it including the tool pen!

  • Question about Enterprise Manager for a manually created database

    DB versions: 10 gr 2, 11g

    I will create 10 gr 2, database 11G manually (without using DBCA). Enterprise manager be installed automatically if I use the CREATE DATABASE command like
    create database "mnprod"
    user sys identified by mnsys
    user system identified by mnsys
        logfile
        group 1 (
            '/u02/oradata/redologs/ora238_redo1a.log',
            .
            .
            .
            .

    Enterprise manager be installed automatically if I use the CREATE DATABASE command like
    No, you need to expilicity create "oem" repository 'DBCA' or 'EMCA '.

    Kind regards
    Taj

Maybe you are looking for

  • can I delete folder seen in iPhoto? What is the effect.

    I'm trying to save some memory and see the 3 types of shirts: thumbnails, previews and the masters. I tried to read some of the forums on this topic but none doesn't make clear what exactly does the previews and that I have effects and consequences w

  • Install a second hard drive on HP ENVY 15

    I just bought a HP ENVY 15 t-j100. I chose to have an SSD instead of the 1 TB drive. I was told that the original drive may be installed as a secondary but stupidly decided not to. Believe it or not, I have been concerned about the extra weight! Hey,

  • Window previews are not more Live

    I just noticed that my window previews are more direct. If I make a video player preview shows a still picture of the video instead of the video playback. DWM behaves like its counterpart Windows 7 right now. Is this due to a recent patch or I'm havi

  • E-mail of reconciliation by program

    I have a device connected to a BES with Exchange. I call the Exchange mailbox (Outlook) "mailbox." and BlackBerry-device-Mailbox 'pocket '. Our software important data sent by e-mail. After importation, the enamel is removed. If "reconciliation delet

  • Help me. H700 RAID does not detect the HARD drive.

    Hello everyone! My Dell C2100 used CPU X 5650 and 700 Raid Perc. After connection, system says: "Enclosed envelope does not support in the direct mapping of the controller mode. Please contact your system. System was interrupted because of the suppor