Error in timestamp query

select ENO from emp versions between timestamp
to_timestamp(to_char('17-JUL-09 12.05.03.000000 PM','dd-mm-yyyy hh24:mi:ss'),'dd-mm-yyyy hh24:mi:ss')
and systimestamp
The above query is throwing the below error.
ORA-01722: invalid number
PLease clarify....
thanks,
vinodh

Thanks Sean for correcting me (again) :) I kinda overlooked it.... :(
And Oracle was kind enough to ignore the error for me: :D
SQL> SELECT TO_TIMESTAMP ('17-JUL-09 02.45.23.848000 PM',
  2                       'dd-mm-yyyy hh:mi:ss.ff6 pm'
  3                      )
  4    FROM DUAL
  5  /
TO_TIMESTAMP('17-JUL-0902.45.23.848000PM','DD-MM-YYYYHH:MI:SS.FF6PM')
17-JUL-09 02.45.23.848000000 PM
1 row selected.
SQL> SELECT TO_TIMESTAMP ('17-JUL-2009 02.45.23.848000 PM',
  2                       'dd-mon-yyyy hh12.mi.ss.ff6 PM'
  3                      )
  4    FROM DUAL
  5  /
TO_TIMESTAMP('17-JUL-200902.45.23.848000PM','DD-MON-YYYYHH12.MI.SS.FF6PM')
17-JUL-09 02.45.23.848000000 PM
1 row selected.
SQL> Regards,
Jo

Similar Messages

  • Web Analysis Error -- Error while executing query and retrieving data

    Regarding Web Analysis:
    We have a number of reports that we created. yesterday they were all working fine. today we try to open them and most are generating an error.
    The error is:
    Error while executing query and retrieving data.; nested exception is:
    com.hyperion.ap.APException: [1033] Native:
    1013033[Thu Oct 22 09:08:17
    2009]server name/application name/database name/user name/Error91013033)
    ReportWriter exit abnormally
    Does anyone have any insight into what is going on?
    My version information is:
    Hyperion System 9 BI+ Analytic Administration Services 9.3.0.1.1 Build 2
    Web Analysis 9.3.0.0.0.286
    Thanks in advance for your help.
    DaveW

    Hi,
    And also click on check option by opening the query in Query designer,as Mr . Arun suggested.
    And if you get any error in checking, see the long message(detail).
    With rgds,
    Anil Kumar Sharma .P

  • Error while running query in BI Answer

    Hi All,
    I am getting this error while executing a query in BI Answer.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1114, message: ORA-01114: IO error writing block to file %s (block # %s) at OCI call OCIStmtExecute
    Do anyone have any idea about this error. The query was running and i was able to see the output but suddenly it throws this error.
    Awaiting for response.
    Thanks
    Ashok

    Its an Oracle database error, possibly caused because your file system has filled up, or because the disk device is no longer available. Possibly caused by a Sort operation on your query causing the TEMP segment to auto extend and fill up the filesystem, but I'm guessing at the last bit.
    You need to contact your DBA to investigate further.
    Edited by: Matt T on Dec 16, 2008 10:38 AM

  • Error while executing query in OLAP server

    Dear all,
    we are using APD to extracted sales data for the last 3 months .this APD was executed perfectly till yesterday.
    in today's run APD got failed with error message as below
    "@5C\QError@     Fiscal year variant Z3 is not maintained for calendar year 9999
    "@5C\QError@     Error while executing query in OLAP server; redesign query.
    Please suggest corrective action .
    I have tried executing manually with less selections on creation date by no success..
    regards,
    puru

    Purushotham wrote:
    Hi Jeeth,
    >
    > in query we have selection for " currency type " and created on "  .we are not using fiscal year variant.
    >
    > in first strep of APD design only we have a problem and also recently there are no changes to this APD .
    >
    > It was executed perfectly on till 4th .
    >
    > Edited by: Purushotham on Feb 6, 2012 12:48 PM
    Dear Purushotham, You can maintain the Fiscal year Variant in OB29. 2 possibilities, #1 : Data for the FYV/Year could be wrong. #2 : Updates for Fiscal Year might not have been done. You can maintaine FY varients up to FY 2XXX in your BW system. This should fix the error. The table T009 must be the same as we get when we do OB29 TCode in BW, so via SPRO do rebuild of table again.
    Edited by: Arun Bala G on Feb 6, 2012 4:05 PM

  • Getting below error while opening query in bex  3.5x

    Dear Guru's
    I am getting below error while opening query in bex  3.5x
    The following object were not found when accesing the server .
    Press repair to correct the problem (included parts of query deleted) press cancel to undo the last action.
    Regards
    Karan

    Hi,
    1) When a query administrator with the sufficient authorization (sap_all or the * authorization for the field in the authorization object) is creating the query in query designer including the 'attributes' which are not visible with the 'normal' authorizations, the query will not list the columns in the output when it is executed by the normal user.
    2) so create an authorization object for each of these attributes with * (full authorization)
    Regards,
    Marasa.

  • Error while activating query element.

    Dear All
                  Can any one tell this error .
                  When iam transporting the queries to BI production there is an errror in Transportation log that  error while activating query element.
    But  the querysis fine in Bi quality.
    Error : Error while activating "6899QYGVHJPGYUBLKA9SPHORZ".

    Hi
    Might be that query element was deleted(not used n was used before in dev) while creating cross check once in your query.
    First check what is that element which is not transported?
    use table RSZELTDIR to find out weather its a Var or CKF or RKF etc...
    then check for the same in the query in QA weather its active and ported fine to QA if not try to collect the element and transport to QA in a separate request.
    Regards
    KP

  • Error while copy query between infocubes

    I was trying to copy a query between infocubes and ended with error message.
    Query copied from Infocube A to Infocube B. Infocube B has an additional dimension with 2 char's when compared to infocube A.
    Using transaction RSZC, I tried to copy the query, but ended up with following error..
    1.Program error in class COPY_QRY_TO_CUBE method : UNCAUGHT_EXCEPTION
    2.An exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handled locally, nor declared in a RAISING clause
    3.The system tried to insert a data record, even though a data record with the same primary key already exists
    I also tried using function module RSZ_I_COPY_QRY_TO_CUBE, which was of no help. I get the following message with the function module...
    1. Program error in class RS_TESTFRAME_CALL method : UNCAUGHT_EXCEPTION
    2. An exception with the type CX_SY_OPEN_SQL_DB occurred, but was neither handled locally, nor declared in a RAISING clause
    3. The system tried to insert a data record, even though a data record with the same primary key already exists
    I have also tried a solution in BW expert by using debugging mode of the above function module, again this was of no help..
    I am BI 7.0 SP09...
    Any ideas, Please....
    Thanks,
    RR
    Message was edited by:
            Ray R

    Hello,
    Are you trying to copy Business Content delivered Queries?
    I had also got this error when copying over all queries from one cube to another. Reason for this message was plain simple - I did not realise that the sender Cube had Business Content Query which we cannot copy over using RSZC as system tries to create another query with suffix as 0****_1. We cannot create query in SAP user namespace. Error message is different then the reason behind it.
    Thanks
    Ravi

  • Another Error Executing Database Query.

    I am getting this error.
    12:40:54.054 - Database Exception - in
    C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm : line
    26
    Error Executing Database Query.
    i have added extra fields in the mdb and added extra code to
    the form page and the action page.
    i am getting this error still.
    this is how i broke it down.
    If I run my 2 files EmployeeAddForm.cfm and
    EmployeeAddAction.cfm
    I get this error:
    NOTE: if i take out the comments from the code and ignore the
    new fields added to the db it works fine!!!!!
    The web site you are accessing has experienced an unexpected
    error.
    Please contact the website administrator.
    The following information is meant for the website developer
    for debugging purposes.
    Error Occurred While Processing Request
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
    INSERT INTO statement.
    Resources:
    Enable Robust Exception Information to provide greater detail
    about the source of errors. In the Administrator, click Debugging
    & Logging > Debugging Settings, and select the Robust
    Exception Information option.
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
    SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote Address 127.0.0.1
    Referrer
    http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
    Date/Time 06-Jun-07 12:40 PM
    NOTE: if i take out the comments from the code and ignore the
    new fields added to the db it works fine!!!!!

    Try using '###CreateODBCDate(Form.DateOfBirth)###'. Access is
    strange on
    handling dates. It has a been a while since I have used
    Access so it could
    be as simple as wrapping it single quotes as well. I am
    assuming the
    "<!-----------" wasn't intended, but I could be wrong.
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "Coldfusionstudent" <[email protected]>
    wrote in message
    news:[email protected]...
    >I am getting this error.
    > 12:40:54.054 - Database Exception - in
    >
    C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm : line
    26
    > Error Executing Database Query.
    >
    > i have added extra fields in the mdb and added extra
    code to the form page
    > and
    > the action page.
    > i am getting this error still.
    > this is how i broke it down.
    >
    > If I run my 2 files EmployeeAddForm.cfm and
    EmployeeAddAction.cfm
    > I get this error:
    >
    > The web site you are accessing has experienced an
    unexpected error.
    > Please contact the website administrator.
    >
    > The following information is meant for the website
    developer for debugging
    > purposes.
    >
    > Error Occurred While Processing Request
    > Error Executing Database Query.
    > [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft
    > Access Driver] Syntax error in INSERT INTO statement.
    >
    >
    > Resources:
    > Enable Robust Exception Information to provide greater
    detail about the
    > source
    > of errors. In the Administrator, click Debugging &
    Logging > Debugging
    > Settings, and select the Robust Exception Information
    option.
    > Check the ColdFusion documentation to verify that you
    are using the
    > correct
    > syntax.
    > Search the Knowledge Base to find a solution to your
    problem.
    >
    >
    > Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
    5.1; SV1; .NET CLR
    > 1.1.4322; .NET CLR 2.0.50727)
    > Remote Address 127.0.0.1
    > Referrer
    http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
    > Date/Time 06-Jun-07 12:40 PM
    >
    >
    >
    > EmployeeAddForm.cfm
    >
    > <cfquery name="GetCompanies"
    > datasource="#Request.MainDSN#">
    > SELECT
    > CompanyID,
    > CompanyName
    > FROM
    > Company
    > ORDER BY
    > CompanyName
    > </cfquery>
    >
    > <html>
    > <head>
    > <title>ColdFusion MX Bible</title>
    > <link rel="stylesheet" href="styles.css">
    > </head>
    >
    > <body>
    >
    > <h1> </h1>
    >
    > <table>
    > <cfform action="EmployeeAddAction.cfm"
    method="POST">
    >
    > <tr>
    > <td>Company</td>
    > <td>
    > <cfselect name="CompanyID"
    > size="1"
    > query="GetCompanies"
    > value="CompanyID"
    > display="CompanyName"
    > required="Yes"
    > message="Please select a Company."></cfselect>
    > </td>
    > </tr>
    >
    > <tr>
    > <td>SSN</td>
    > <td>
    > <cfinput type="Text"
    > name="SSN"
    > message="Please enter the employee's Social Security
    Number."
    > validate="social_security_number"
    > required="Yes"
    > size="12"
    > maxlength="11">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>First Name</td>
    > <td>
    > <cfinput type="Text"
    > name="Firstname"
    > message="Please enter the employee's first name."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>Last Name</td>
    > <td>
    > <cfinput type="Text"
    > name="Lastname"
    > message="Please enter the employee's last name."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>Salary</td>
    > <td>
    > <cfinput type="Text"
    > name="Salary"
    > message="Please enter a valid salary."
    > validate="float"
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>
    >
    > <tr>
    > <td>DOB</td>
    > <td>
    > <cfinput type="Text"
    > name="DateOfBirth"
    > message="Please enter a valid date of birth in the
    format mm/dd/yyyy"
    > validate="date"
    > required="Yes"
    > size="11"
    > maxlength="10">
    > </td>
    > </tr><!-------------
    > <tr>
    > <td>device_typ</td>
    > <td>
    > <cfinput type="Text"
    > name="device_typ"
    > message="Please enter the employee's device_typ."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr><tr>
    > <td>device_Email</td>
    > <td>
    > <cfinput type="Text"
    > name="device_Email"
    > message="Please enter the employee's device_Email."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr><tr>
    > <td>Work_email</td>
    > <td>
    > <cfinput type="Text"
    > name="Work_email"
    > message="Please enter the employee's Work_email."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr><tr>
    > <td>Pin_Number</td>
    > <td>
    > <cfinput type="Text"
    > name="Pin_Number"
    > message="Please enter the employee's Pin_Number."
    > required="Yes"
    > size="22"
    > maxlength="20">
    > </td>
    > </tr>------------------>
    > <tr>
    > <td> </td>
    > <td>
    > <input type="submit" value="Add to Database">
    > </td>
    > </tr>
    >
    > </cfform>
    > </table>
    >
    > </body>
    > </html>
    > ---------------------------
    > EmployeeAddAction.cfm
    >
    > <cfquery name="InsertEmployee"
    > datasource="#Request.MainDSN#">
    > INSERT INTO Employee(
    > SSN,
    > CompanyID,
    > Firstname,
    > Lastname,
    > Salary,
    > DateOfBirth<!----------,
    > device_typ,
    > device_Email,
    > Work_email,
    > Pin_Number-------------->
    >
    > )
    > VALUES (
    > '#Trim(Form.SSN)#',
    > #Val(Form.CompanyID)#,
    > '#Trim(Form.Firstname)#',
    > '#Trim(Form.Lastname)#',
    > #Val(Form.Salary)#,
    > #CreateODBCDate(Form.DateOfBirth)#<!-----------,
    > '#Trim(Form.device_typ)#',
    > '#Trim(Form.device_Email)#',
    > '#Trim(Form.Work_email)#',
    > '#Trim(Form.Pin_Number)#'------------------>
    > )
    > </cfquery>
    >
    > <cfmail
    to="#Form.Firstname#.#Form.Lastname#@somewhere.com"
    > from="[email protected]"
    > subject="Welcome to your new company!">
    > Welcome to your new company, #Form.Firstname#
    #Form.Lastname#!
    > </cfmail>
    > <!----
    > <cflocation url="EmployeeList.cfm">----->
    >

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • MS SQL - Syntax error for valid query

    I have a problem with the second query in this code (gives me
    a syntax error in my HAVING line)
    <cfquery name="getDupes" datasource="#application.ODBC1#"
    dbtype="ODBC" username="#application.userNameODBC1#"
    password="#application.userPassODBC1#">
    SELECT *
    FROM view_FormCount
    WHERE formCount >= 2
    ORDER BY formNum
    </cfquery>
    <cfset variables.lstForms = "">
    <cfoutput query="getDupes">
    <cfset variables.lstForms=
    listAppend(variables.lstForms,"'#getDupes.formNum#'")>
    </cfoutput>
    <cfset variables.whereClause = "(formNum =
    #ReplaceNoCase(variables.lstForms,',',' OR formNum =
    ','ALL')#)">
    <cfquery name="getDetails"
    datasource="#application.ODBC1#" dbtype="ODBC"
    username="#application.userNameODBC1#"
    password="#application.userPassODBC1#">
    SELECT tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr
    FROM tblForms INNER JOIN tblCompanies ON tblForms.formCustNum
    = tblCompanies.companyNum
    GROUP BY tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr
    HAVING #variables.whereClause#
    ORDER BY tblForms.formNum, tblForms.formCustNum
    </cfquery>
    Now, the really odd thing is if I just take the query text
    out of the CFQUERY tags and use CFOUTPUT instead (to see in my
    browser what query is getting executed) I get a query that I can
    paste into Enterprise Mgr and runs fine.
    I can even paste the resulting text into my code in a CFQUERY
    and CF will run it fine.
    In other words, the dynamic version query gives me an error,
    but if I just output the SQL statement, copy-and-paste that into
    the CFQUERY that's erroring out (replacing what's there) to run as
    a static query, it works fine (sample of static query below).
    The error I get when I try to do it dynamically is "Error
    Executing Database Query. [Macromedia][SQLServer JDBC
    Driver][SQLServer]Line 4: Incorrect syntax near '10169318'. The
    error occurred on line 21." which is where the HAVING clause
    starts.
    SELECT tblForms.formNum, tblForms.formName,
    tblForms.formCustNum, tblCompanies.companyAbbr FROM tblForms INNER
    JOIN tblCompanies ON tblForms.formCustNum = tblCompanies.companyNum
    GROUP BY tblForms.formNum, tblForms.formName, tblForms.formCustNum,
    tblCompanies.companyAbbr HAVING (formNum = '10169318' OR formNum =
    '1016CONCERTA' OR formNum = '1016NSAIDS' OR formNum =
    '1016STRATTERA' OR formNum = '1016WELLBUTRIN' OR formNum =
    '18504211' OR formNum = '185093807' OR formNum = '73208565' OR
    formNum = '732120027' OR formNum = '7322154' OR formNum = '7323402'
    OR formNum = '7323522' OR formNum = '73238900' OR formNum =
    '7324211' OR formNum = '7324211S' OR formNum = '7324265' OR formNum
    = '73242891' OR formNum = '732434341' OR formNum = '732434342' OR
    formNum = '73243435' OR formNum = '73243436' OR formNum =
    '73243439' OR formNum = '73243440' OR formNum = '73243441' OR
    formNum = '73243442' OR formNum = '73243443' OR formNum = '7324359'
    OR formNum = '7324360' OR formNum = '7324370' OR formNum =
    '7324560' OR formNum = '7324959' OR formNum = '7326411ptreg' OR
    formNum = '7326599' OR formNum = '7326600' OR formNum = '7326620'
    OR formNum = '7326707' OR formNum = '7326931' OR formNum =
    '7328410' OR formNum = '732851031TOP' OR formNum = '7328512' OR
    formNum = '7328548' OR formNum = '7328548P2' OR formNum =
    '7328548P3' OR formNum = '7328548P4' OR formNum = '73289400' OR
    formNum = '73290D' OR formNum = '7329154' OR formNum =
    '73291544JHS' OR formNum = '73291545JHS' OR formNum =
    '73291546JHSMH' OR formNum = '73291547JHSMH' OR formNum = '7329174'
    OR formNum = '7329308' OR formNum = '7329402' OR formNum =
    '7329424' OR formNum = '7329455' OR formNum = '7329520' OR formNum
    = '7329539' OR formNum = '73297701JH' OR formNum = '73298273' OR
    formNum = '73298400' OR formNum = '73298403' OR formNum =
    '73298404' OR formNum = '7329883' OR formNum = '73298860' OR
    formNum = '7329887' OR formNum = '73298974' OR formNum = '7329899'
    OR formNum = '7329899S' OR formNum = '73299190' OR formNum =
    '7329987' OR formNum = '7329999PTO' OR formNum = '732AV5160' OR
    formNum = '732CMHFRAZ' OR formNum = '732HIPAA' OR formNum =
    '732HIPAAFLYERS' OR formNum = '734HEART' OR formNum = '7444711' OR
    formNum = '7449230' OR formNum = '744HR4991' OR formNum =
    '7538014MI' OR formNum = '77511044' OR formNum = '77511045' OR
    formNum = '775stampnochange' OR formNum = '80851001BLUE' OR formNum
    = '80MR4200' OR formNum = '80MR4273' OR formNum = '80MR4274' OR
    formNum = '80MR4300' OR formNum = '80MR9934' OR formNum =
    '80MR9935' OR formNum = '80SHC100' OR formNum = '80SHC4301' OR
    formNum = '80SHC9830' OR formNum = '80SHC9832') ORDER BY
    tblForms.formNum, tblForms.formCustNum

    AWFrueh1808 wrote:
    > OK, that's simple enough. But then I'm really confused
    as to why the query in
    > my original post/example didn't work.
    >
    > The only single quotes in my #whereClause# variable were
    wrapped around each
    > varchar value in the WHERE clause (well, HAVING) as in
    HAVING formNum = '12345'
    > OR formNum = '54321'
    >
    > I never used a single quote within the value itself. And
    yet
    > preservesinglequotes fixed it. So what was CF doing? Why
    did the single
    > quotes still show up in the error msg - and in the right
    place?
    >
    As I said the default behavior is to escape the quotes in
    your variables
    as data. So the default output of your SQL statement, before
    preserveSingleQuotes() would be like this.
    HAVING formNum = ''12345'' OR formNum = ''54321''
    As you can see that is not the desired results in your case.
    In your
    case you have the proper number of single quotes in your
    string and you
    do not want any added. You want to preserve them so to say.
    Thus
    adding preserveSingleQuotes() around your whereClase
    variable, i.e.
    preserveSingleQuotes(whereClause) says do not add any quotes,
    keep them
    all single.

  • Syntax error in a query

    Hello all
    I have a query, and i got this error , any idea ?
    Error starting at line 1 in command:
    WITH continent_table  AS
    SELECT     en.country,en.continent
            ,ROW_NUMBER() OVER (PARTITION BY en.country ORDER BY en.percent DESC) ran
         FROM     encompasses en
         where ran=1
    select co.name,con.continent,co.population/co.area as pop_density,ec.GDP,pop.Population_Growth,pop.infant_mortality,pol.government
    from country co
    join economy ec
    on co.code=ec.country
    join population pop
    on co.code=pop.country
    join politics pol
    on co.code=pol.country
    join continent_table  con
    on co.code=con.country
    Error at Command Line:6 Column:8
    Error report:
    SQL Error: ORA-00904: "RAN": invalid identifier
    00904. 00000 -  "%s: invalid identifier"
    *Cause:   
    *Action:im using oracle 11g
    thank you in advance
    best,
    david

    >
    So is it still possible to use this selection as a view? because i can run it but i can not use it to create a view
    i think because i have with xx as structure, i don't know
    >
    I don't know either since you didn't post your 4 digit Oracle version. You probably just have an error in your query.
    This works for me using vanilla 11.2.0.1.0:
    create view v_emp as
    WITH q AS
    SELECT empno, deptno, ename
            ,ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY deptno) r_id
        FROM    emp
    q1  AS
    SELECT * from q where r_id < 3
    SELECT * from q1
    select * from v_emp
    EMPNO     DEPTNO     ENAME     R_ID
    7782     10     CLARK     1
    7934     10     MILLER     2
    7369     20     SMITH     1
    7902     20     FORD     2
    7499     30     ALLEN     1
    7521     30     WARD     2

  • Error in sap query

    Dear Experts ,
    I have a query and executing using SQ01 . Here im getting warnings as 
    The query specifications cannot be used to generate a list, i.e. the query will probably not return the list you desire.
    If you still want to execute the query, please use the "Generate" function . -> 'Generate'
    Here im not getitng the output i require . then the system says ** Fields from parallel tables within a line Line: 02
    Field: Account number of supplier or vendor  (LFB1-LIFNR, table LFB1) ;
    Field: Account number of supplier or vendor (LFBK-LIFNR, table LFBK)
    Same thing comes for Bank country key, bank key , bank account number .
    Please heklp as to what is wrong

    Hello,
    I am gettig the Same Error in SAP Query, But i have generated My Infosets & cross checked the Fields with Query.
    Plz let me know what could be the Error.
    Thanks.

  • Error in join query

    I get error in following querY sAying "Unable to interpret XKTSCH".
    report ZTF1.
    tables: AFKO, AFVC.
    DATA: XSTEUS LIKE AFVC-STEUS,
          XKTSCH LIKE AFVC-KTSCH,
          XLTXA1 LIKE AFVC-LTXA1.
    SELECT SINGLE AFVCSTEUS AFVCKTSCH AFVC~LTXA1 FROM
      AFVC INNER JOIN AFKO
        ON AFVCAUFPL = AFKOAUFPL 
         INTO XSTEUS XKTSCH XLTXA1
          where AFKOAUFNR = '007200000059' and AFVCVORNR = '0010'.
    WRITE:/ XSTEUS.
    WRITE:/ XKTSCH.
    WRITE:/ XLTXA1.

    Hi tushar
    Just write your varaible in bracket as:
    .. INTO ( XSTEUS XKTSCH XLTXA1 ) where ...
    Regards
    Ashish Jain

  • [Execute SQL Task] Error: Executing the query failed with error: "The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION."

    I have an package with source , data flow and destination to execute on begin and commit.
    in the below i have just used for questioning purpose with diagram removing my Data Flow task explaining my problem
    on execution, i get error as
    [Execute SQL Task] Error: Executing the query "COMMIT TRAN DimCompanyCode" failed with the following error: "The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.". Possible failure reasons: Problems with the query, "ResultSet"
    property not set correctly, parameters not set correctly, or connection not established correctly.
    as mentioned , i have checked the ResultSet, parameters , connection establish.. all are fine.
    Kindly advice on what has to be done.
    ShanmugaRaj

    To avoid this error, the RetainSameConnection property should set to 'True' for the Connection Manager - Application_DB.
    Narsimha

  • Why there is a error in this query ?

    why there is a error in this query ?
    declare
    v_exist pls_integer;
    v_search varchar2(255) := '175';
    v_sql varchar2(255);
    begin
    for s in
    (select table_name, column_name
    from user_tab_columns
    where data_type like '%CHAR%'
    order by table_name, column_name)
    loop
    v_sql := 'select count(*) from '||s.table_name||
    ' where instr('||s.column_name||',' || CHR(39)|| v_search|| CHR(39) ||') > 0';
    execute immediate v_sql into v_exist;
    if v_exist > 0 then
    dbms_output.put_line(s.table_name||'.'||s.column_name||' matches the string.');
    end if;
    end loop;
    end;
    Error:
    The following error has occurred:
    ORA-00933: SQL command not properly ended
    ORA-06512: at line 14
    Edited by: user575089 on Dec 23, 2009 4:14 AM
    Edited by: user575089 on Dec 23, 2009 4:14 AM

    See, Right now i am in schema and see below :
    set serveroutput on;
    declare
    v_exist pls_integer;
    v_search varchar2(255) := 'SCOTT';
    v_sql varchar2(255);
    begin
    for s in
    (select '"'||table_name||'"' table_name,'"'||column_name||'"' column_name
    from user_tab_columns
    where data_type like '%CHAR%'
    and table_name not like '%$%'
    order by table_name, column_name)
    loop
    v_sql := 'select count(*) from '||s.table_name||' where instr('||s.column_name||',' || CHR(39)|| v_search|| CHR(39)||') > 0';
    --dbms_output.put_line(v_sql);
    --execute immediate v_sql;
    execute immediate v_sql into v_exist;
    if v_exist > 0 then
    dbms_output.put_line(s.table_name||'.'||s.column_name||' matches the string.');
    end if;
    end loop;
    end;
    "EMP"."ENAME" matches the string.
    "EXCEPTIONS"."OWNER" matches the string.
    "FLOW_TABLE"."OBJECT_OWNER" matches the string.
    "MYEMP"."ENAME" matches the string.
    PL/SQL procedure successfully completed.
    I am getting output; that i search "SCOTT" word in my search string.

Maybe you are looking for

  • Pension Contribution

    Hi I am working on International Payroll. When an employee is hired in the mid-month, the Employee and Employer pension contribution is not getting calculated and not getting deducted in the payroll. Kindly resolve this issue. Thanks vish

  • [SOLVED] VMware player, network doesn't work

    Hi! I installed VMware player through AUR and it works well. But when I started my vm (Debian 4.0) it asked if I had copied or moved it. I chose "I copied it" because I copied it from my hdd to external hdd. I started my vm but network didn't work. I

  • Bridge CS5.1 is not respoding.  Getting error messages that there is not enough memory and need to clear central cash.

    On MAC OS X 10.7.5.  Editing raw files in Bridge and have been getting error messages every time I open Bridge that there is not enough memory.  Other messages are to clear the central cache.  Can't find the central cache on my system.  Please help!

  • AllinOne.js[dynamic] error while zooming and navigating to next page

    hi.. i'm using crystal report 13 and vs2010 in 32 bit OS reports are working fine but when i click to next page or zoom or find a word then the allinOne.js[dynamic] file opens and shows the below error.. Microsoft JScript runtime error: 'children.len

  • How can Javascript in BW web template access query data

    Hi All, I want to access the BW query data from within Javascript within the BW Web template. Can you kindly share ideas how I can make my Javascript reach the query results returned by the dataprovider query in the BW template. Your help is highly a