Error with query in OracleDataAdapter

I have the following query:
<code>SELECT FI.FACILITY_OID, FI.FACILITY_NUMBER , FI.FACILITY_NAME , FI.TYPE_CODE ,
TC.DESCRIPTION AS TYPE_CODE_DESCRIPTION, FI.SUB_CATEGORY_CODE , SCC.NAME AS CATEGORY_CODE_DESCRIPTION,
FI.HEADWALL_TYPE, FI.EXTERNAL_LENGTH , FI.EXTERNAL_WIDTH ,
FI.INTERNAL_LENGTH , FI.INTERNAL_WIDTH , FI.FRONT_BARRICADED ,
FI.INTERNAL_VOLUME , FI.FRAG_CONTAINED , FI.PORT_FACIL_EXCEPTION ,
FI.REINFORCED_OPENINGS , FI.SINGLE_AIRCRAFT
FROM FACILITY_INFO FI INNER JOIN TYPE_CODE TC ON FI.TYPE_CODE = TC.TYPE_CODE
INNER JOIN SUB_CATEGORY_CODE SCC ON FI.SUB_CATEGORY_CODE = SCC.SUB_CATEGORY_CODE
WHERE FI.TYPE_CODE IN ('ECM', 'AGM', 'REM', 'OSM', 'EOL')
AND FI.INSTALLATION_ID = 1000 </code>
The query works fine when I run it in the SQL command window of the OracleXE database web management tool, but when I try to use the query in the OracleDataAdapter.FillSchema method, I get the error:
System.InvalidOperationException occurred
Message="Syntax Error: Expecting ',' or 'WHERE' (etc.) after table alias."
Source="System.Data.OracleClient"
If I skip the FillSchema method and just call Adapter.Fill it works just fine - the query runs and the data is returned. So I would just drop the call to Adapter.FillSchema, but I suspect somebody put that call there for a reason and it will be missed it I just take it out. :)
Anybody got any insight as to what's going on?

Perhaps removing the ANSI syntax would be beneficial?
SELECT
   FI.FACILITY_OID                        ,
   FI.FACILITY_NUMBER                     ,
   FI.FACILITY_NAME                       ,
   FI.TYPE_CODE                           ,
   TC.DESCRIPTION AS TYPE_CODE_DESCRIPTION,
   FI.SUB_CATEGORY_CODE                   ,
   SCC.NAME AS CATEGORY_CODE_DESCRIPTION  ,
   FI.HEADWALL_TYPE                       ,
   FI.EXTERNAL_LENGTH                     ,
   FI.EXTERNAL_WIDTH                      ,
   FI.INTERNAL_LENGTH                     ,
   FI.INTERNAL_WIDTH                      ,
   FI.FRONT_BARRICADED                    ,
   FI.INTERNAL_VOLUME                     ,
   FI.FRAG_CONTAINED                      ,
   FI.PORT_FACIL_EXCEPTION                ,
   FI.REINFORCED_OPENINGS                 ,
   FI.SINGLE_AIRCRAFT
FROM
   FACILITY_INFO     FI
   TYPE_CODE         TC,
   SUB_CATEGORY_CODE SCC
WHERE
   FI.TYPE_CODE       IN ('ECM', 'AGM', 'REM', 'OSM', 'EOL')
AND
   FI.INSTALLATION_ID = 1000
AND
   FI.TYPE_CODE = TC.TYPE_CODE
AND
   FI.SUB_CATEGORY_CODE = SCC.SUB_CATEGORY_CODE  

Similar Messages

  • URGENT: Error with query on MultiProvider

    Hi,
    I am designing a query on a MultiProvider that combines a cube and ODS. the common characterisitics in the cube & ODS are Material, fiscal period, country.
    I have 2 rows & 1 column and several free characterisitics (mostly navigational attributes of Material).
    Rows: KF1 (from cube) & KF2 (from ODS)
    Column: Fiscal Period
    I have done all the selections & Identification in the multiprovider and set the ODS for BW reporting.
    I am not able to get data from ODS with query on MultiProvider.
    And i need to add another row that calculates the product of KF1 & KF2. KF1 is sales quantity and KF2 is price identified uniquely by Material/Country combination. When we report at Country level wihtout any material selection the output revenue should be SUM of individual products between KF1 & KF2 (if there are 3 materials (A) sold that have a price of X and 2 materials (B) sold that have a price of Y, the answer should be 3X + 2Y instead of (32) * (XY)/2.
    and also i have geographical hierarchy for 0country which is used in ODS & cube. can i use the geographical hierarchy for ODS as well for aggregation of values?
    Regards
    Emil

    Hi, i have solved the issue by impementing an SAP note.
    and the issue is the in Query i need to calculate a key figure based on the other 2 key figures.
    KF3 = KF1 * KF2
    the only issue here is i need to find the KF1 for each material/country/fiscal period from cube 1 and KF2 for each material/country/fiscal period.
    and multiply and then aggregate according to the filter & selection conditions.
    can anyone let me know how to do it..
    its very urgent..
    thank you
    Emil

  • Expdp error with query parameter

    i am trying to use datapump and using query parameter in there as below...
    but when i use the below, its exporting some system "repcat$" tables and
    nothing realted to scott.audit table or anything realted to my query where
    clause...what am i doing wrong ??
    expdp system
    DUMPFILE=test.dmp
    LOGFILE=test.log
    DIRECTORY=DATA_PUMP_DIR
    TABLES=SCOTT.AUDIT
    QUERY=SCOTT.AUDIT:'"WHERE TRUNC (audit.audit_timestamp)
    BETWEEN TO_DATE ('01012008','DDMMYYYY') AND TO_DATE ('13012008','DDMMYYYY')"'
    also when i use scott instead of system user i get below error
    Export: Release 10.2.0.3.0 - 64bit Production on Wednesday, 22 July, 2009 12:53:45
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-39145: directory object parameter must be specified and non-null

    i treid again, but creating a new datapump dir as follows...create or replace dir dpdump as '/backup/dpdump/orcl';
    then gave grant read,write on directory dpdump to system
    and now why is oracle looking at a differnt location ?? even when i changed the
    direcotry ???
    $ expdp SYSTEM
    DUMPFILE=test.dmp
    LOGFILE=test.log
    DIRECTORY=DPDUMP
    QUERY=SCOTT.AUDIT:'"WHERE TRUNC (audit.audit_timestamp)
    BETWEEN TO_DATE ('01012008','DDMMYYYY') AND TO_DATE ('13012008','DDMMYYYY')"'
    Export: Release 10.2.0.3.0 - 64bit Production on Wednesday, 22 July, 2009 13:27:18
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification
    ORA-31641: unable to create dump file "/oracle/app/oracle/product/10.2.0/admin/orcl/dpdump/expdat.dmp"
    ORA-27038: created file already exists
    Additional information: 1
    $>
    Seems little weird but can you:--
    1. Drop the dpdump directory.
    SQL> drop directory dpdump;
    2. recreate it and then grant the permissions.
    SQL> create directory dpdump as '/backup/dpdump/orcl';
    The folders must exists in the location.
    SQL> grant read,write on directory dpdump to system;
    3. SELECT directory_name, grantee, privilege
    FROM user_tab_privs t, all_directories d
    WHERE t.table_name(+)=d.directory_name
    ORDER BY 1,2,3;
    Anand

  • SID error with Query Execution

    I am executing a query and receiving the following error:
    Abort SID 2 for characteristic ZSLSREG could not be converted CL_RSDM_READ_MAST
    Abort system error in program SAPLRRK0 and form MEGA_SORT_02-02
    The ZSLS InfoObject is a text InfoObject only and contains 47 lines of text.  However, when I look into the SID table /BIC/SZSLSREG, I don't see the X's that I see in other InfoObjects, in the DATAFL & INCFL fields. 
    This query has several other custom objects that work fine.  And they all have X's in their SID table. 
    This query with this object works in our development system, but I am having trouble in our test system.  I have retransported the InfoObject again too the test system, but still receive the same error message.
    Any help greatly appreciated.  Keith J

    Try running t-code RSRV and correcting the infoobjects.  Specifically the "Check Master Data for a Characteristic " test.

  • Errors with querying a query table using non-QoQ query and QoQ query

    HELP ! ! !  Going into testing soon. I need this to work to get correct report results ! ! ! !
    My issue seems similar to the one just answered about Query of Queries RunTime Error
    and the reply from lawhite01 caught my eye.
    This is a 2 parter. The second part is the QoQ part, but the 1st part has a line in the query that is similar to the QoQ one and it uses the same data. Part 1 also throws an error.
    PART # 1.
    I'm trying to use a query table created through QueryNew and then query it.
    I need multiple columns in the query table I create:
    <cfscript>
            tot_AllCurrentDraftListing = QueryNew("AnnounceNum, JP_PDLoc, JP_JS_Title, JP_JS, JP_KW_1, JP_JobTitle, JP_Open, JP_Close, JP_CloseType, JP_CloseName, JP_PosNeed, JP_DirectHire, JP_Desc, JP_Draft, JP_Archived, JP_State, JP_AreaName, JP_AreaID, JP_AreaAlias, JP_Fac_SU, JP_Fac_Facility, JP_FAC_ID, JP_Grade1, JP_sal_low1, JP_sal_high1, JP_Grade2, JP_sal_low2, JP_sal_high2, JP_Grade3, JP_sal_low3, JP_sal_high3, JP_Grade4, JP_sal_low4, JP_sal_high4, JP_Grade5, JP_sal_low5, JP_sal_high5, JP_Posted, JP_TypeHire, JP_HRemail");
        </cfscript>
    Then I populate all the cells of the query table.
    Then I set up to use the created query table.
    I do this first:
        <cfquery name="qAltPostID" datasource="#at_datasource#">
             SELECT AltPoster, fk_Job_AnnounceNum
             from JOB_JPContacts
             Where AltJPContactType = 'AltPosterID'
             and AltPoster = '#session.IHSUID#'
             </cfquery>
    Then, in my first query using the created query, I expect to need to choose from multiple values, so I'm using this line in the query (this is NOT a QoQ query):
                and AnnounceNum IN (<cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qAltPostID.fk_Job_AnnounceNum)#">)
    I've also tried:
                   and AnnounceNum IN (#ValueList(qAltPostID.fk_Job_AnnounceNum)#)   
    and:
                   and JOB_AnnounceNum IN
                    SELECT fk_Job_AnnounceNum
                    from JOB_JPContacts
                    Where AltJPContactType = 'AltPosterID'
                    and AltPoster = '#session.IHSUID#'
    ERROR is: one record should return. I get 0.
    PART # 2: Here's the QoQ part.
    I get the error:
    Query Of Queries runtime error.
    Comparison exception while executing IN.
    Unsupported Type Comparison Exception: The IN operator does not support comparison between the following types:
    Left hand side expression type = "LONG".
    Right hand side expression type = "STRING".
    A tutorial I found gave an example using only one column for this part of the fix:
         tot_AllCurrentDraftListing = QueryNew("AnnounceNum", "CF_SQL_VARCHAR")
    How would I set up the query with the datatype when I'm using multiple columns:
    <cfscript>
            tot_AllCurrentDraftListing = QueryNew("AnnounceNum, JP_PDLoc, JP_JS_Title, JP_JS, JP_KW_1, JP_JobTitle, JP_Open, JP_Close, JP_CloseType, JP_CloseName, JP_PosNeed, JP_DirectHire, JP_Desc, JP_Draft, JP_Archived, JP_State, JP_AreaName, JP_AreaID, JP_AreaAlias, JP_Fac_SU, JP_Fac_Facility, JP_FAC_ID, JP_Grade1, JP_sal_low1, JP_sal_high1, JP_Grade2, JP_sal_low2, JP_sal_high2, JP_Grade3, JP_sal_low3, JP_sal_high3, JP_Grade4, JP_sal_low4, JP_sal_high4, JP_Grade5, JP_sal_low5, JP_sal_high5, JP_Posted, JP_TypeHire, JP_HRemail");
        </cfscript>
    I used this code after all the cells contained values and before running my QoQ query:
            <cfloop index="intID" from="1" to="#tot_AllCurrentDraftListing.recordcount#" step="1">
                <cfset tot_AllCurrentDraftListing["AnnounceNum"] [intID] = JavaCast("string", intID) />
            </cfloop>
              Is that correct?
    Thanks.
    Whoever can help me with this should be awarded extra points ! ! ! !

                and AnnounceNum IN (<cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qAltPostID.fk_Job_AnnounceNum)#">)
    If you're passing a list as a param, you need to tell <cfqueryparam> it's a list.  Read:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_18.html#1102474
    ERROR is: one record should return. I get 0.
    It's a bit hard to comment on this sort of thing without knowing the data involved.
    A tutorial I found gave an example using only one column for this part of the fix:     tot_AllCurrentDraftListing = QueryNew("AnnounceNum", "CF_SQL_VARCHAR")
    How would I set up the query with the datatype when I'm using multiple columns:
    Again, this is a matter of reading the relevant docs:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/functions_m-r_19.html#292759
    As a general rule, if you're having trouble with the syntax of a CFML statement, look it up in the docs.
    Adam

  • Oracle 10g exp error with query parameter

    Hi all,
    I am trying to perform an export but getting this error when using the query parameter. I think it's a syntax problem but not sure where.
    I'm in a dos prompt
    E:\>exp file=xxxxx.dmp log=xxxx.log tables=xxxxx query='where responseid not in (select responseid from aaaa_bbbbb)';
    LRM-00112: multiple values not allowed for parameter 'query'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully
    Thx

    This is why I love this forum so much.
    I've probably done thousands of exports and never used the query parameter.
    Here's something that will help you. Please read and note the requirement to escape, or protect, special characters and such.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm
      exp scott/tiger TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<1600\"ji li

  • Error with Query

    Hi Guys,
    I'm writing the below query to select some data
    select 'EARLY','17-OCT-11','pm_own.sec_switches', 'inflate_protected_bond_sw',sww.inflate_protected_bond_sw, 'com.inflate_protected_bond_sw', 'CHAR' ,99
    from DB.TBLname
    in the above query the value 'sww.inflate_protected_bond_sw ' should come from another table, so when I'm executing this query I'm getting the below error.
    ORA-00904: "SWW"."INFLATE_PROTECTED_BOND_SW": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    so what should I put over there to get the result,
    any help.
    Cheers,
    Naresh

    Yeah Thanks Man, actually my query is as below,
    select 'EARLY','17-OCT-11','pm_own.sec_switches', 'inflate_protected_bond_sw',ssw.inflate_protected_bond_sw, com.inflate_protected_bond_sw, 'CHAR' ,99
    from pm_own.sec_switches ssw, TAPS_OWN.ssm_common com
    where ssw.ssm_id = com.ssm_id and NVL(ssw.inflate_protected_bond_sw, '') <> com.inflate_protected_bond_sw and com.index_constituent_sw = 'Y';
    and returning the output as below
    returning
    EARLY, 17 - OCT-11, pm,pm_own.sec_switches, inflate_protected_bond_sw, inflate_protected_bond_sw*, inflate_protected_bond_sw_1+, char,99
    but not returning the actual values in the table. WHY..?
    Cheers,
    Naresh

  • Query Engine report error with Crystal Report 9 And MS SQL SErver 2000

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...
    Refer the above statement highlighted in BOLD. That statement is WRONG. Select what ???? Try any one of the below statement,
    select ''
    --or
    select 0
    --or
    select null
    Regards, RSingh

  • An error occurred querying a data source - with REST services

    Hi,
    I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
    I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
    REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    Please help me to resolve this issue.
    Thanks in advance for your time and reply :)

    Hi,
    According to your post, my understanding is that an error occurred querying a data source with REST services.
    It is defiantly permission issue with GetUserProfileByName service
    and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
    Here are some similar threads for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • "Source not found" Error creating URL Data control with query parameters

    Hi,
    I have a restful service for which i want to create a URL data control. I am able to create the URL data control successfully when i am not passing any parameters in the Source field. But if i am specifying the parameters in the source field like this Department=##ParamName##, something weird is happening. After giving the param string in the Source field, it asks for default param value to test the url. It tests the url successfully. After that i select XML as the data format in which i am mentioning the xsd like this . "file:///C:/..../something.xsd" . And this is when i am getting the error. "Invalid Connection. The source is not found". I am giving exactly same path for xsd which i gave while creating URL data control without query parameters. Infact i was able to create the URL data control with query parameters successfully till afternoon. after that it started giving me this error all of a sudden. Infact as soon as i was able to create a URL data contol with query parameter successfully, i took a backup of the application before moving further. But even that backup is not working now.
    As far as i understand, i dont think there will be any change in xsd if query params are passed to a web service. Please correct me if i am wrong.
    Just dont know what could be the issue. Please help
    Thanks

    Hi,
    xsd is used for the URL service to know what the returned data structure is so it can create the ADF DC metadata
    Frank

  • SQL query alias names errors with dynamic lists

    Hullo,
    Problem:
    - Made a query form book database. Have authors in separate table with unique ID's referring to them on book table.
    - Query fetches author name in "Surname, Firstname initial.Secondfirstname initial" format, --> like "Bukowski, H.C" and giving that combo alias name in SQL like "AS 'author'"...
    - Dynamic list works fine at start, but when ordered from detail table back to the mainlisting, it does make an error with SQL stating "unknown column 'author' in where clause"
    That must be because the script looks for "author" column from the original table yeah, but how can I solve this? Any ideas? Does this mean that Alias names for columns are not possible or is there something i've missed?
    Any ideas, suggestions?
    Thanks,
    KimmoK

    Hi Kimmo,
    ADDT´s dynamic lists can handle alias columns fine to my experience, but I reckon that you most probably applied the "CONCAT(...) AS author" query modification after having generated the list, and the list´s internal WHERE clause seems to have no clue of this alias column.
    You can get an idea about using alias columns in Dynamic Lists in my tutorial "Dynamic Lists: exploring the Filter Conditions": http://www.guenter-schenk.com/tutorials/tutorial.php?id=6
    Can you please post the list´s code on your server as text file (e.g. code.txt) and provide a link to this file ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Replacement Path with query---error

    Hi
    I have one query 'B' which uses replacement path variable(with query  A) on 'Customer' infoobject in Global filter area.
    So everytime,I execute query 'B',first query 'A' runs and gives some customers list who are active yesterday and today.This active customers list is fed into replacement variable in query 'B' and query 'B' shows its own result.
    The problem,we have is,Query 'B' is showing some customers who are not in the list returned by query 'A'.
    Any ideas,how I can fix this problem?
    Thanks.............

    Hi
    Thanks for your reply.
    Both run on same Multiprovider.
    First thing is...this Customer infoobject is placed in Global filter area of Main Query and the infoobject has replacement path variable(with query on it).So the main query's data is limited to whatever customers that are given by replacement path query.
    how can Main query show some customers data thats not been given by this replacement path query?
    Second thing is...when user reported this error,he showed error in screenshots.When I ran query today,error is gone.Its showing correct.I reported to user and he informed that its happening now and then ....He gave one more example that happened today which is exactly of some type.....Main Query is showing customers that are not given by Replacement path query .....
    Any ideas?Thanks

  • Error While query exection with Restriction?

    Hi Expert's,
    I have query with  restrictions as Assignment status- Missing and Upper and for Asset status -Donated,Lost,Stolen and Disposed.
    But query will execute in Bex analyzer/ Execute on the web but when I execute the query through portal it is throwing an error.
    When I did  some trial and error exercise on this query I came to that the issue is related to the restrictions.The query works fine for the restriction  Assignment status as u2018Missingu2019 and Asset status as u2018Lost u2018but for other restrictions the issue is again same.
    1.Is it the issue with the query design?
    2.Is the issue with the software?
    Do I need to rise a OSS? please help me to resovle this issue.
    Points will be definitely assigned.
    Thanks,
    Vasu
    Edited by: vasu vassu on Jul 22, 2010 8:44 AM

    Hi,
    Is this error with only this report or with some other reports as well?
    Some time this occur due to java patch so check if this error is for one or more reports.
    If this is with only this query then execute the query in RSRT and generate the query first. Are you getting any warning/error over there? Try these things it will provide better picture.
    Sometimes removing restriction and charectristics from query saving that and add it agin works. You may try that as well.
    I hope this will help.
    Thanks,
    S

  • Odd Error with decode function in Order By Clause

    I am trying to compile a procedure and can't get around an error with a dynamic order by that doesn't make much sense to me. I can repoduce the error with a plain select statment in sql plus so I can rule out a declaration error. Here is an example with 2 numeric columns and a date column.
    select task_id, display_date, remark_id from task_list
    where task_id > 1000
    order by decode('Task_ID', 'Task_ID',Task_ID, 'Display_Date', Display_Date, 'Remark_ID',Remark_ID)
    returns the error:
    select task_id, display_date, remark_id from task_list
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected NUMBER got DATE
    I'm not sure why this error is occuring, because it doesn't even hit the Display_Date field in the Decode statment. If I take the Display_date out of the statement, it runs properly. If I change Display_Date to To_Char(Display_Date) it also runs fine, but the sorting is incorrect. Also I'm running 9.2, and do not want to use dynamic sql to build my query. Any Ideas out there as to the cause of this error?

    I did find a workaround to this issue by breaking the decode statment into three separate statement, but I still think that the way it is written above should work, and may be a bug, or an error that I don't understand fully.
    The Order by was rewritten like this:
    order by decode(pSort, 'Task_ID',Task_ID), decode(pSort, 'Display_Date', Display_Date),
    decode(pSort, 'Remark_ID',Remark_ID);
    Thanks

  • Error with an infoset in BI

    HI BI gurus,
    we have a problem with an infoset.
    We create an infoset in RSA1 linked to a cube and a DSO.
    We activate it in english without problems and I can create a query with no errors (with a english logon).
    If I try to create a query in italian language the query designer show mw this error: " unexpected error - RCF_SYSTEM_FAILURE. You must restart the query designer."
    Do you have any idea how to fix and solve this problem? We try to activete the infoset in Italian but the error remains.
    Thanks for any help.
    SB

    Hi,
    is italien installed as a language in your system?
    Siggi

Maybe you are looking for

  • How do I know if I can install a JAVA component on a SAP product ?

    Dear SAP, I have a generic question. I need to know if a JAVA Component can be installed in a system. Let's take an example : ==> There is EP Core Java Component. ==> My question : May I install this JAVA Software Component EP Core in a SAP SRM 7.0 /

  • Help on tuning update query

    Hi, I work on below version of oracle. SQL> select * from v$version; BANNER Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi PL/SQL Release 10.2.0.5.0 - Production CORE    10.2.0.5.0      Production TNS for IBM/AIX RISC System/6000: V

  • Template child files not updating

    HI, ok I'm trying to make a template to update mutilple pages. When I save changes on my template it examines the files but will NOT update them. I am creating the templates by applying a template to a new page or in the asset panel. Basically, I upd

  • Finder closes when I try to access shared computers

    I'm running Mavericks on my late 2013 MacBook Pro. When I try to access a shared computer on my network, the Finder window closes as soon as I click on the computer I want to access. File sharing is turned on on the target computers, both iMacs, one

  • Error shown in Web form doesnt pop up in Smartview

    Hi I have a web form where users enter data in runtime prompts and there is a validation which prompts an error if the user selects an year less than the current forecast year. This error is hanlded through a script and @return function. Th errors po