Getting an error -from keyword not found where needed.

plzz reaply asap!!!
what is wrong with the query???
SELECT
aaa.user_id
aaa.ispeak,
SUM (round(aaa.aduration_seconds/decode(aaa.ispeak,0,offpeakpulse,peakpulse))*decode(ispeak,0,offpeakpulse,peakpulse)) DURATION,
srt.circle,
srt.package_id ,
srt.peak_rate ,
srt.offpeak_rate ,
srt.bst_plantype ,
srt.free_value ,
srt.peak_pulse ,
srt.offpeak_pulse ,
srt.pulse_unit ,
srt.rating_unit
FROM aaa_sessions aaa, subscriber_rate_tab srt
WHERE aaa.user_id = srt.externalid(+)
AND (aaa.start_time_utc between srt.activedt and srt.inactivedt)
AND (aaa.end_time_utc between srt.activedt and srt.inactivedt);

That's why formatting is important, you missed comma in the very first line. aaa.user_id. Always try to write formatted code, for example:
SELECT aaa.user_id,
       aaa.ispeak,
       SUM(round(aaa.aduration_seconds /
                 decode(aaa.ispeak, 0, offpeakpulse, peakpulse)) *
           decode(ispeak, 0, offpeakpulse, peakpulse)) DURATION,
       srt.circle,
       srt.package_id,
       srt.peak_rate,
       srt.offpeak_rate,
       srt.bst_plantype,
       srt.free_value,
       srt.peak_pulse,
       srt.offpeak_pulse,
       srt.pulse_unit,
       srt.rating_unit
  FROM aaa_sessions aaa, subscriber_rate_tab srt
WHERE aaa.user_id = srt.externalid(+)
   AND (aaa.start_time_utc between srt.activedt and srt.inactivedt)
   AND (aaa.end_time_utc between srt.activedt and srt.inactivedt);Now there is another thing about you group function SUM. But I am leaving that up to you sort it out.

Similar Messages

  • I am getting error from keyword not found where expected

    I am unable to find the error in the following query... its giving from key word not found where expected
    select ms.state_name,sum(decode(mp.status,'12',1,0)) cnt_active,sum(decode( mp.status,'12',mh.chargesheet_name,0)) sum_active,
    sum(decode(mp.status,'18',1,0))) cnt_inactive, sum(decode( mp.status,'18',mh.chargesheet_name,0)) sum_inactive,
    sum(decode(mp.status,'',1,'5',1,'16',1,'17',1,0)) cnt_expired, sum(decode( mp.status,'',mh.chargesheet_name,'5',mh.chargesheet_name,'16',mh.chargesheet_name,'17',mh.chargesheet_name,0)) sum_expired
    from mst_pindetails mp,mst_batchno mb,mst_chargesheet_hdr mh,mst_state ms where mp.swhbatchcode=mb.swhbatchcode and mb.chargesheetno = mh.chargesheet_code
    and trim(ms.state_id) = mb.statecode group by state_name

    ok working no problem

  • 'FROM keyword not found where expected'error while Inserting into Text file

    Hi,
    I have created a simple interface for testing purpose. All it has to do is to Read the data from a Source Text file and put it into another text file (exactly the same headers as that of source) ...
    I am using Oracle as my staging area.
    But at 'Insert column Header' Stage, it gives me a warning 'FROM keyword not found where expected' and when it goes to the next step 'Insert Rows' it gives me the same error 'FROM keyword not found where expected' and aborts its execution.
    I checked the query for insertion and found nothing wrong in it (FROM Statement is just where it is expected, that is) but somehow its not working.
    Can somebody help me out as i have done it before on other Installations and dont know why it is occuring that too for the simplest thing in ODI ...
    Regards,
    Nitesh.

    Probably you missed the concat operator.
    select rpad(nvl(lu_parid,' '),1,19)|| v_comma ||
    rpad(nvl(lu_class,' '),1,3)
    from temp_te07                                                                                                                                                                                                                                                                                                           

  • ORA-00923:FROM KEYWORD NOT FOUND WHERE EXPECTED

    I have nade a oracle ODBC TO MS-EXCEL.While writting query in microsoft query editor I got the error msg
    ORA-00923:FROM KEYWORD NOT FOUND WHERE EXPECTED
    The following query runs fine on sql plus editior
    wht could be the reason ,pls guide me
    select ORDR_H.ORDERDT,ordR_h.orderno,ordr_h.partycd "CODE",
    DECODE (PARTY_M.PARTY_TY,1,'TRADE',2,'NTR'),
    party_m.party_n1,c1.citee_nm "Stockist Place",
    c.citee_nm "CONSIGNEE PLACE"
    from citee_m c,citee_m c1,ordr_h,ordr_d,party_m
    where
    ordr_h.orderno=ordr_d.orderno
    and c.citee_cd=ordr_h.destncd
    and c1.citee_cd=party_ct
    and ordr_h.partycd=party_m.party_cd
    and ordr_h.orderdt>='01-jan-09'
    order by 2,3

    One thing that comes to mind is that ODBC does not allow Oracle-specific syntax.

  • 2.1 EA 1: ORA-00923: FROM keyword not found where expected

    Hi,
    there is a simple table which results in this error when opening the data tab. All other tabs are ok. In 1.5 the table can be opened with the data tab.
    Columns:
    ID     NUMBER     No          1
    PARENT_ID     NUMBER     Yes          2
    NODE_NAME     VARCHAR2(50 BYTE)     Yes          3
    KREDFILIALE     VARCHAR2(50 BYTE)     Yes          4
    VALID_FROM     DATE     Yes     to_date('20081001','yyyymmdd')     5
    VALID_TO     DATE     Yes     to_date('20090930','yyyymmdd')     6
    LEVEL     NUMBER(2,0)     Yes          7
    LIEFERANTENNR     VARCHAR2(50 BYTE)     Yes          8
    SCGROUP     NUMBER     Yes          9
    Regards,
    Juergen

    logged Bug 9000729 - ea1: otnforum: datatab fails to open for a reserved keyword column name
    -Raghu

  • When I try to update LR I get an error message Application not found

    When I try to update LR I get an error message "Application not found".
    When I try Help in LR it can't be found.
    What is wrong?

    Talked with Adobe support. Told me to go to Cloud app and log out, then log
    in again and then update. Worked fine for me. Hope this helps!
    Best regards,
    Fredrik Moell
    Tomatis New Zealand
    www.tomatis.co.nz
    A division of Your Amazing Health Ltd
    54 Fancourt Street, Meadowbank, Auckland 1072
    0800-TOMATIS (866 2847)
    Personal 021-1721 930

  • I am running firefox 23.0.1. I just upgraded to evernote 5.0+. When I try to add webclipper 5.7 to firefox I get the error Firefox can not modify the neede

    I am running firefox 23.0.1. I just upgraded to evernote 5.0+.
    When I try to add webclipper 5.7 to firefox I get the error
    Firefox can not modify the needed file
    I could not locate the files referenced in the answers presented.

    Firefox no longer unpacks an extension automatically, but renames the XPI file to the ID of the extension and copies that file to the extensions folder in the Firefox Profile Folder.
    If an extension needs to be unpacked then there should be an unpack directive (<nowiki><em:unpack>true</em:unpack></nowiki>) in the install.rdf file of that extension.
    * https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking
    You can try to set the extensions.alwaysUnpack pref to true on the about:config page.
    *http://kb.mozillazine.org/about:config

  • I want to add refworks grabit to my tool bar, when I try to install for firefox it won' t let me this is what I get: HTTP Error 404.3 - Not Found The page you a

    this is the complete error I get. I just installed firefox so that I can use this feature and now it is useless.
    Error Summary
    HTTP Error 404.3 - Not Found
    The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
    Detailed Error Information
    Module StaticFileModule
    Notification ExecuteRequestHandler
    Handler StaticFile
    Error Code 0x80070032
    Requested URL http://www.refworks.com:80/refgrabit/install.xpi
    Physical Path E:\RefGrabIt\install.xpi
    Logon Method Anonymous
    Logon User Anonymous
    Failed Request Tracing Log Directory C:\inetpub\logs\FailedReqLogFiles
    Most likely causes:
    It is possible that a handler mapping is missing. By default, the static file handler processes all content.
    The feature you are trying to use may not be installed.
    The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
    If ASP.NET is not installed.
    Things you can try:
    In system.webServer/handlers:
    Ensure that the expected handler for the current page is mapped.
    Pay extra attention to preconditions (for example, runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
    Pay extra attention to typographical errors in the expected handler line.
    Please verify that the feature you are trying to use is installed.
    Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe.
    To set a MIME type, use the following syntax: %SystemRoot%\windows\system32\inetsrv\appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
    The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
    For example, to add a MIME map for a file which has the extension ".xyz": appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
    Warning: Ensure that this MIME mapping is needed for your Web server before adding it to the list. Configuration files such as .CONFIG or dynamic scripting pages such as .ASP or .ASPX, should not be downloaded directly and should always be processed through a handler. Other files such as database files or those used to store configuration, like .XML or .MDF, are sometimes used to store configuration information. Determine if clients can download these file types before enabling them.
    Install ASP.NET.
    Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
    Links and More Information This error occurs when the file extension of the requested URL is for a MIME type that is not configured on the server. You can add a MIME type for the file extension for files that are not dynamic scripting pages, database, or configuration files. Process those file types using a handler. You should not allows direct downloads of dynamic scripting pages, database or configuration files.
    View more information »

    That file might have moved to a different location on the server. I think you'll need to check with RefWorks support or your local IT department on why the install page links do not work.

  • Error 821 XI 3.0, while eamil getting an error format is not found!!!

    In XI 3.0 When I goto SCOT and click on INT or SMTP then click "SET" from support address type window "Internnet is selected"
    Its comes "output format for SAP documents" window and show some format like PDF, THM and TXT thats it its not show full format like "RAW, ALI, OBJ, OTF, SCR, URL" someting like that...
    how to install thase format please help me becuase getting an error messages "connot convert nodes, parameters can't be found!"  Error 821
    Please help me
    Travis

    We have tried this with various level of J2SE without much luck and have also tried to load the .jar file manually using javaw. We have come to the conclusion that the .jar is in fact corrupted in some way.
    And of course tried to clear the Java Cache on the client side ( using control panel ).
    Thanks for the inputs - will keep you updated.

  • I am Getting an error as file not found when i am trying to open vm virtual

    I am getting an error when i am trying to open my oracle vm virtual box
    The error is as follows
    Runtime error opening 'C:\Users\S Pavan Kumar Reddy\VirtualBox VMs\Windows\Windows.vbox' for reading: -102 (File not found.).
    E:\tinderbox\win-rel\src\VBox\Main\src-server\MachineImpl.cpp[724] (long __cdecl Machine::registeredInit(void)).
    Result Code:
    E_FAIL (0x80004005)
    Component:
    Machine
    Interface:
    IMachine {22781af3-1c96-4126-9edf-67a020e0e858}
    So please anybody can help me to solve my problem or anybody can say how to back up the data present in my virtual box because my whole project is rest in that virtual box so please help me out to solve my problem

    Hi EJ,
    I wanted to check in to make sure you have everything working at this point?
    Let me know if you have further questions.
    Regards, Stacy

  • From keyword not Found error

    Brief History :
    Before our application is running in websphere5.0 now i migraded to websphere 6.0.Now our application is running in websphere 6.0.In our application we have written all our quries in one .xml(SelectRepository.xml....) file.
    Problem:
    while i am going through my application(while doing searching,inserting and updating) i am getting some query problem.we are using one parser for parsing these .xml repositories.
    Problem Description :
    If our query is in 4 lines,the first line is mixed with second line,if there is no space after fist line.
    My Doubt of problem:
    we are using 3 common .jar files in websphere 5.0 and websphere 6.0
    names xalan.jar,xerces.jar,xsl.jar.
    My doubt is whether can i use same files for websphere 6.0 or i have to use some other files.
    Final description :
    Plz provide help me out in the query problem.it requires space in each line ending of every query.

    Brief History :
    Before our application is running in websphere5.0 now i migraded to websphere 6.0.Now our application is running in websphere 6.0.In our application we have written all our quries in one .xml(SelectRepository.xml....) file.
    Problem:
    while i am going through my application(while doing searching,inserting and updating) i am getting some query problem.we are using one parser for parsing these .xml repositories.
    Problem Description :
    If our query is in 4 lines,the first line is mixed with second line,if there is no space after fist line.
    My Doubt of problem:
    we are using 3 common .jar files in websphere 5.0 and websphere 6.0
    names xalan.jar,xerces.jar,xsl.jar.
    My doubt is whether can i use same files for websphere 6.0 or i have to use some other files.
    Final description :
    Plz provide help me out in the query problem.it requires space in each line ending of every query.

  • When I enter any category in the search box of Google or Yahoo, I get the error message "404 Not Found."

    Yesterday I got the error message "timed out."
    This has been going on for more than two days.

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • I keep getting an error message - Serner not found

    when I try to go into Firefox an error message comes up - Server no found . I have already checked with my internet provider and they ran a check and all are working correctly. I did upgrade to the latest firefox this morning and that didn't help. Is there something else I should have done?

    If you're not a developer then you really should not have upgraded.
    I'm unsure how you can fix this as you have already done a back-up on iOS 7 and apple don't support firmware downgrades.

  • I paid for PDF Pack and keep getting an error 404 - file not found when I try to do anything

    Just paid for PDF Pack and cannot get it to start working.  Have a file open, went to account, create, got to website, and it wont let me do anything,

    Hi EJ,
    I wanted to check in to make sure you have everything working at this point?
    Let me know if you have further questions.
    Regards, Stacy

  • I get the error messages: "Server not found" or "Cannot connect to Server" and thus cannot print. I don't even know what a server is.

    Hello: I am not computer savvy.
    I have run "Network Diagnostics" and the message "Cannot connect to Server" comes up. I can connect to the internet. I have tried turning off the whole system and the printer individually and nothing seems to change the message.

    hello,
    i got the same issue i'm using kde the link abe for "Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup" guide is dead
    arkham wrote:Have you tried the inittab approach for starting kdm? http://wiki.archlinux.org/index.php/Add … tab_Method
    could you help me please ?
    Thank you
    Last edited by hael (2012-05-05 08:57:44)

Maybe you are looking for