Wierd SQL Select Compile Error

Hello.
When I do my SQL like this:
SQL SELECT cus_surname as "Surname",
cus_forename as
"FirstName",
cus_telephone as
"Telephone",
cus_address as
"Address1",
cus_line1 as
"Address2",
cus_line2 as
"Address3",
cus_town as
"Address4",
cus_city as
"Address5",
cus_postcode as
"Address6"
INTO :lCustomer
FROM msp_customers
WHERE cus_serial = :lRefCustomer.Serial
on session SessionToUse;
I get this compile error:
The read-only virtual attribute
FoundationClasses.FoundationBusinessObject.IsNew can't be passed as an
OUTPUT or an INPUT OUTPUT parameter.
Yet if I remove the "as" from the SQL Select syntax it works, with no
compile errors.
Why? I don't understand why they are different!
Tim Sawyer
PanCredit
Leeds, UK.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

I added a DBMS_OUTPUT.put_line(l_wrap) in keith codes
and run out put wrapped test codes in sqlplus and can see wrapped test procedure.
create or replace procedure test wrapped
a000000
b2
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
11d 124
ohyVALi7ang26ROCF0CZ3wLg6ngwgy7Q2SdqfC/p+D6E39xrRLEK0/eVVEVSORSTWoZXk1gi
JT9nTrV3IXmGVbi5uMlIl+0C/WV9wPlFL5z37QfcEOYUdmLx8iwul2hEvDehUX0jLfiltHqx
MhAgy16zDvWPfv5uE4HrlBvRAYoDmETXR7r10x/uyQyUxDw4sVyq6Ndh4GSFw9zp801nKSN1
P0GOB03CtlcnrqAjQhASJKrP4sXW74oOyr373DBBP/CLndRTT0TZ1HvWVzAgL5C++Dl6PNyQ
But I got compiled errors as
Compilation errors for PROCEDURE SYS.TEST
Error: PLS-00103: Encountered the symbol "ASWALLET_OPEN" when expecting one of the following:
( ; is with authid as cluster compress order using compiled
wrapped external deterministic parallel_enable pipelined
result_cache
The symbol "is" was substituted for "ASWALLET_OPEN" to continue.
Line: 1
Text: create or replace procedure test wrapped
Error: PLS-00103: Encountered the symbol "=" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
The symbol "<an identifier>" was substituted for "=" to continue.
Line: 1
Text: create or replace procedure test wrapped
Error: PLS-00103: Encountered the symbol "=" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
Line: 1
Text: create or replace procedure test wrapped
.Bot trigger and procedure works well before wrapped.
I use oracle 11g2 at window 2003.
Thanks
newdba

Similar Messages

  • PL/SQL Procedure Compilation error

    Hi,
    <br><br>
    I have wrote a PL/SQL Stored Procedure to read a couple of table values and then output some data to a file, when I create the procedure on the database I get the following compilation error:
    <br><br>
    LINE/COL ERROR<br>
    -------- -----------------------------------------------------------------<br>
    25/7 PLS-00103: Encountered the symbol ")" when expecting one of the<br>
    following:<br>
    ( - + case mod new null <an identifier><br>
    <a double-quoted delimited-identifier> <a bind variable> avg<br>
    count current max min prior sql stddev sum variance execute<br>
    forall merge time timestamp interval date<br>
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe<br>
    The symbol "null" was substituted for ")" to continue.<br>
    <br>
    The script is below: <br><br>
    CREATE OR REPLACE <br>
         PROCEDURE TDF_EXTRACT AS<br>
    v_file UTL_FILE.FILE_TYPE;<br>
    YEAR number(4);<br>
    Q1_VALUE NUMBER(7);<br><br>
    BEGIN<br><br>
    SELECT PERSON_VALUE<br>
    INTO     Q1_VALUE<br>
    FROM PERSON<br>
    WHERE ID = 79;<br><br>
    SELECT EXTRACT(YEAR FROM SYSDATE)<br>
    INTO YEAR <br>
    FROM DUAL;<br><br>
    v_file := UTL_FILE.FOPEN(location => '/tmp',<br>
    filename => 'extratced_values.txt',<br>
    open_mode => 'W',<br>
    max_linesize => 32767);<br><br>
    UTL_FILE.PUT_LINE(v_file,<br>
    'Q1'     ||     YEAR     ||     '23'     ||     Q1_VALUE || '\r\n' ||<br>
              );<br><br>
    UTL_FILE.FCLOSE(v_file);<br><br>
    END TDF_EXTRACT;

    'Q1' || YEAR || '23' || Q1_VALUE || '\r\n' ||
    );Syntax error during concatenation, maybe?
    C.
    Message was edited by:
    cd

  • Sql statement  - compilation error

    I have a sql statement in a method that looks something like this:
    for each row in
    SELECT *
    FROM LASC.CMS.VW_CERTIFICATEOFGOODSTANDING1
    WHERE barNum = LASC.CertificationRequest.barNum
    do
    display ...
    end
    when I try to compile it, I get an error saying:
    SQL statements can only be used in functions or procedures that run on the server side.
    I am fairly new to BPM, so I am not sure how to resolve this.
    Any help would be greatly appreciated.
    Lilach

    here is the solution that Ignacio provided.
    You could go to Properties tab on the right (in Studio) for this method and inside the Method Properties section, you have on boolean property called "Server Side Method". Check it on "True".
    Hope this helps.
    Ignacio

  • (SD 1.5.4.59.40) Compilation with coment - success with compilation error

    Hi!
    If I run this script:
    create table t(n number);
    create or replace
    TRIGGER t1
    -- Coment wiсh work!
    BEFORE UPDATE ON t
    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    DECLARE
    past_due EXCEPTION;
    begin
    if 1 = 1 then
    raise_application_error(-20001, 'First trigger!' , TRUE);
    end if;
    end t1;
    +/+
    create or replace
    -- Coment with error
    TRIGGER t2
    BEFORE UPDATE ON t
    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    DECLARE
    past_due EXCEPTION;
    begin
    if 1 <> 1 then
    raise_application_error(-20001, 'Second trigger!' , TRUE);
    end if;
    end;
    +/+
    Result:
    +SQL Command: create or replace --+
    Failed: ORA-24344: success with compilation error
    +24344. 00000 - "success with compilation error"+
    *Cause:    A sql/plsql compilation error occurred.+
    *Action:   Return OCI_SUCCESS_WITH_INFO along with the error code+
    anonymous block completed
    trigger text in SLD Developer:
    create or replace TRIGGER t2
    BEFORE UPDATE ON t
    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    DECLARE
    past_due EXCEPTION

    It looks to me like there is a bug in the logic that determines if the current statement is SQL (terminated by ";") or PL/SQL (terminated by "/") - putting the comment before the object type you are creating is causing SQL Developer to assume it is SQL and it stops the statement at the first ";".
    The same thing happens if you try to create a package with a comment between the "create or replace" and the "package", for example:
    create or replace
    -- comment
    package xxx_pkg
    i number;
    j number;
    end;
    /creates a package with the following source, executing as a statement (so long as the cursor is between the create and the first ";"):
    package xxx_pkg
    i numbertheFurryOne

  • Compilation error in PL/SQL

    Hi All,
    Please find the strange query situation in PLSQL.
    If i run the query without PLSQL block (i.e. declar begin end) it runs well and insert data
    in table but if put the same query in PLSQL block it gives compilation error.
    Following is the spool
    SQL> select * from v$version;
    BANNER                                                                                                                                     
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production                                                                                 
    PL/SQL Release 8.1.7.4.0 - Production                                                                                                      
    CORE     8.1.7.0.0     Production                                                                                                                  
    TNS for IBM/AIX RISC System/6000: Version 8.1.7.4.0 - Production                                                                           
    NLSRTL Version 3.4.1.0.0 - Production                                                                                                      
    SQL> insert into smcbom_load_hours_temp
      2  select data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date) v_period,sum(v_hr),-1,sysdate,-1,sysdate
      3  from (
      4  select plan_level,sp.data_set_name,
      5  sp.value1,smcbom_flex_budget.calculate_period_days(sp.period1),inweight ,
      6  usagerate ,operationseq,percent,
      7  sbov.group_id,sp.alloy,sp.planner_code,
      8  sbov.days,sbov.totaloffsetdays,deptclass,dept,
      9  decode(plan_level,1,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate *
    10  (SELECT MAX(INWEIGHT)
    11  FROM  SMCBOM_BOM_OPERATION_VIEW
    12  WHERE ALLOY=sbov.alloy
    13  AND   PLANNER_CODE=sbov.planner_code
    14  AND   PLAN_LEVEL = 0
    15  AND   GROUP_ID = sbov.group_id ),
    16  0,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate ,
    17  1) v_hr,
    18  smcbom_flex_budget.get_start_date(sp.period14)+sbov.totaloffsetdays v_date,
    19  sum(-sbov.totaloffsetdays)
    20  over (partition by sp.alloy,sp.planner_code,sbov.group_id
    21  order by plan_level asc,operationseq desc)  new_offset
    22  from smcbom_bom_operation_view sbov,smcbom_sales_prod_forecasts sp
    23  where sbov.alloy= sp.alloy
    24  and   sbov.planner_code=sp.planner_code
    25  and group_id=521136
    26  )
    27  group by data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date);
    23 rows created.
    SQL> commit;
    Commit complete.
    SQL> declare
      2  begin
      3  insert into smcbom_load_hours_temp
      4  select data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date) v_period,sum(v_hr),-1,sysdate,-1,sysdate
      5  from (
      6  select plan_level,sp.data_set_name,
      7  sp.value1,smcbom_flex_budget.calculate_period_days(sp.period1),inweight ,
      8  usagerate ,operationseq,percent,
      9  sbov.group_id,sp.alloy,sp.planner_code,
    10  sbov.days,sbov.totaloffsetdays,deptclass,dept,
    11  decode(plan_level,1,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate *
    12  (SELECT MAX(INWEIGHT)
    13  FROM  SMCBOM_BOM_OPERATION_VIEW
    14  WHERE ALLOY=sbov.alloy
    15  AND   PLANNER_CODE=sbov.planner_code
    16  AND   PLAN_LEVEL = 0
    17  AND   GROUP_ID = sbov.group_id ),
    18  0,(sp.value14/smcbom_flex_budget.calculate_period_days(sp.period14)) * (percent/100) * inweight * usagerate ,
    19  1) v_hr,
    20  smcbom_flex_budget.get_start_date(sp.period14)+sbov.totaloffsetdays v_date,
    21  sum(-sbov.totaloffsetdays)
    22  over (partition by sp.alloy,sp.planner_code,sbov.group_id
    23  order by plan_level asc,operationseq desc)  new_offset
    24  from smcbom_bom_operation_view sbov,smcbom_sales_prod_forecasts sp
    25  where sbov.alloy= sp.alloy
    26  and   sbov.planner_code=sp.planner_code
    27  and group_id=521136
    28  )
    29  group by data_set_name,deptclass,dept,smcbom_flex_budget.get_period(v_date);
    30  end;
    31  /
    (SELECT MAX(INWEIGHT)
    ERROR at line 12:
    ORA-06550: line 12, column 2:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + mod not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    ORA-06550: line 22, column 6:
    PLS-00103: Encountered the symbol "(" when expecting one of the following:
    , from
    SQL> spool off;

    In some versions of Oracle (certainly all of the 8.x versions and earlier, and possibly some of the earlier 9 versions) the SQL parsers in the SQL engine and in the PL/SQL engine were different. Some features that worked directly in SQL did not work in PL/SQL. Scalar sub-queries were one of those things.
    You have three options. You can try to re-write the insert statement to eliminate the PL/SQL unimplemented feature. You can create a view in the database for the SELECT part of the insert statement then use that view in the insert. finally, and least desirable, you can build the whole statment as a string, and use EXECUTE IMMEDIATE to run it in PL/SQL.
    HTH
    John

  • Why does plsql give compilation error for select statement?

    When I run following plsql program, it gives compilation error. Could somebody please point me out what could be wrong here? I am running it from system user.
    create or replace procedure drop_user_proc (iname in varchar2) is
    uname varchar2(100);
    begin
    select username into uname from dba_users where username = upper(iname);
    end drop_user_proc;
    select username from dba_users where username = upper('newuser');
    When I run it, I get following error. dba_users is there that is the reason it works outside plsql block, but it doesn't from inside block.
    SQL> @t4
    Warning: Procedure created with compilation errors.
    USERNAME
    NEWUSER
    SQL> show err
    Errors for PROCEDURE DROP_USER_PROC:
    LINE/COL ERROR
    4/3 PL/SQL: SQL Statement ignored
    4/35 PL/SQL: ORA-00942: table or view does not exist

    Role based grants are not available within the stored procedures.
    Only explicit grants are recognized when compiling stored code.
    You need to grant select on that table to the user where you are creating this procedure.

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • Warning: Type created with compilation errors. sql : oracle 11gr2

    I'm trying to create a supertype customer service and subtype agent and supervisor, so they can inherent values however when I try to run this in oracle sql: a message comes up
    Warning: Type created with compilation errors.
    What is wrong with the code below?
    Create or replace type customer_s_type as object ( csID number, csName varchar(15), csType number ) NOT FINAL;  Create or replace type supervisor_type UNDER customer_s_type ( title varchar (10) );  Create or replace type agent_type UNDER customer_s_type (title varchar (10));  Create table supervisor of supervisor_type ( CONSTRAINT supervisor_PK PRIMARY KEY (csID));  Create table agent of agent_type (CONSTRAINT agent_PK PRIMARY KEY (csID));  create table customer_service( csID number(10), csType number(10), constraint supervisor_pk primary key(csID) );

    Wile creating TYPE you need to terminate with a back slash (/) semi colon does not work.
    Try like this
    create or replace type customer_s_type as object ( csid number, csname varchar(15), cstype number ) not final
    create or replace type supervisor_type under customer_s_type ( title varchar (10) )
    create or replace type agent_type under customer_s_type (title varchar (10))

  • Sqlserver_utilities use for migrating MS SQL to 9i - compilation error

    I've seen lot of questions about compilation error in the sqlserver_utilities particularly on Oracle 9i database where some procedure and functions are not compiled and required rewritten. The main issues seem to be with new features or tables/views not available in pre-10g such as regex, DBA_IND_STATISTICS, etc. Even though there is a IF clause (
    IF NOT DBMS_DB_VERSION.VER_LE_9_2 THEN) to prevent execution, however, it won't work for compilation standpoint.
    My question is that do we need to comment this section out or rewrite to work for 9i - for example, DBA_IND_STATISTICS view for last_analyzed is not in 9i, but we can use last_analyzed in USER_INDEXES. Is that the only option (manual labor work :-) to resolve this issue for 9i database?
    Thanks in advance,
    IC

    I think you made the right choice to go with 10g, 9i is obsolete anyway.
    The Migration Workbench come with SQL Developer might only work with 10g because it's built pretty new in 2007.
    You can try the older version of standalone Oracle Migration Workbench
    http://www.oracle.com/technology/tech/migration/workbench/index.html
    It support 9i, The Oracle Migration Workbench is a tool that simplifies the process of migrating
    Informix, and DB2 databases to the Oracle platform (Oracle9i and Oracle10g). Again, I still believe go with 10g is better choice.

  • Script Task Builds Successfully But Still Has Compile Error (SQL 2012)

    This is repost in a way but the problem has not gone away and I really need to find a solution.
    I have some script from SSIS 2008 that uses the ReportExecution2005
    web service to execute SSRS reports and save the results to Excel. There were some initial problems with confusion between Web Service Reference (legacy?) and Service Reference (WCF) but I think that I have that sorted out
    now.
    The remaining problem is that, while the VB script (which I have pasted in from a working SSIS 2008 Script Task) builds/complies without error, I get a compile error when I close the Script Task and it has the dreaded "Red X" in the Control
    Flow. If I attempt to run the package I get a message box saying that there is a compile error.
    How can I identify the problem and fix the error? The script itself has no errors in SSIS 2008.
    R Campbell

    This is the code by the way (see below) as pasted into the Main sub.
    I have added
    http://localhost/reportserver/reportexecution2005.asmx as a Web Service
    Reference (under the  "Advanced" button) not just a Service Reference (WCF).
    I can build the code without error but I get an error, saying that there is compile error, when I close the Script Task.
    ReportExecutionService definitely shows up in Object Explorer, not the
    WCF "equivalent" of ReportExecutionServiceSoapClient.
    I have always had the impression, that when you close a Script Task, a compiler kicks in to auto-generate some internal script. Could it be (as seems likely) that this compiler is picking up errors that "Build" doesn't (when the script is open)?
    I think that there was once an explicit Compile rather than just Build option in the Script editing environment but I can't find it in SQL 2012 Database Tools (nee BIDS).
    Dim objRSExec As New localhost.ReportExecutionService
    Dim objParam0 As New localhost.ParameterValue
    Dim objParam1 As New localhost.ParameterValue
    Dim objParam2 As New localhost.ParameterValu
    Dim objParam3 As New localhost.ParameterValue
    Dim objParam4 As New localhost.ParameterValue
    Dim objParam5 As New localhost.ParameterValue
    Dim objParam6 As New localhost.ParameterValue
    Dim objParams() As localhost.ParameterValue
    Dim objResult() As Byte
    Dim objStream As FileStream
    Dim FileType As String
    Dim FileExtension As String
    Dim FilePath As String
    Dim NumberOfParameters As Integer
    Dim ReportName As String
    Dim TaskSuccess As Boolean = True
    FileType = Dts.Variables("FileType").Value.ToString()
    FileExtension = Dts.Variables("FileExtension").Value.ToString()
    FilePath = Dts.Variables("FilePathNameExt").Value.ToString()
    ReportName = Dts.Variables("ReportPathName").Value.ToString()
    NumberOfParameters = CInt(Dts.Variables("NumberOfParameters").Value) - 1
    ReDim objParams(NumberOfParameters)
    If NumberOfParameters >= 0 Then
    objParam0.Name = Dts.Variables("P0Name").Value.ToString()
    objParam0.Value = Dts.Variables("P0Value").Value.ToString()
    objParams(0) = objParam0
    End If
    If NumberOfParameters >= 1 Then
    objParam1.Name = Dts.Variables("P1Name").Value.ToString()
    objParam1.Value = Dts.Variables("P1Value").Value.ToString()
    objParams(1) = objParam1
    End If
    If NumberOfParameters >= 2 Then
    objParam2.Name = Dts.Variables("P2Name").Value.ToString()
    objParam2.Value = Dts.Variables("P2Value").Value.ToString()
    objParams(2) = objParam2
    End If
    If NumberOfParameters >= 3 Then
    objParam3.Name = Dts.Variables("P3Name").Value.ToString()
    objParam3.Value = Dts.Variables("P3Value").Value.ToString()
    objParams(3) = objParam3
    End If
    If NumberOfParameters >= 4 Then
    objParam4.Name = Dts.Variables("P4Name").Value.ToString()
    objParam4.Value = Dts.Variables("P4Value").Value.ToString()
    objParams(4) = objParam4
    End If
    If NumberOfParameters >= 5 Then
    objParam5.Name = Dts.Variables("P5Name").Value.ToString()
    objParam5.Value = Dts.Variables("P5Value").Value.ToString()
    objParams(5) = objParam5
    End If
    If NumberOfParameters >= 6 Then
    objParam6.Name = Dts.Variables("P6Name").Value.ToString()
    objParam6.Value = Dts.Variables("P6Value").Value.ToString()
    objParams(6) = objParam6
    End If
    Try
    With objRSExec
    .Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
    .Url = "http://localhost/reportserver/reportexecution2005.asmx"
    .LoadReport(ReportName, Nothing)
    .SetExecutionParameters(objParams, "en-us")
    objResult = .Render(FileType, Nothing, FileExtension, Nothing, Nothing, Nothing, Nothing)
    End With
    objStream = File.Create(FilePath, objResult.Length)
    With objStream
    .Write(objResult, 0, objResult.Length)
    .Close()
    End With
    Catch e As Exception
    Dts.Log("ERROR - RSExec - " & e.Message.ToString(), 100, Nothing)
    TaskSuccess = False
    End Try
    If TaskSuccess Then
    Dts.TaskResult = ScriptResults.Success
    Else
    Dts.TaskResult = ScriptResults.Failure
    End If
    R Campbell

  • Why sql select 'Hello'||'world012345678' from dual; cause error?

    I have problem and your help to solve it would be very much appreciated.
    Can anybody tell why the result is so different for the following two sql-sentence in SQL/PLus?
    sql>select 'Hello'||'world012345678' from dual;
    sql>select 'Hello'||'world0123456789' from dual;
    sql>select 'Hello'||'world012345678' from dual;
    Result:
    select 'Hello'||'world012345678' from dual
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [17182], [158346180], [], [], [],
    sql>select 'Hello'||'world0123456789' from dual;
    Helloworld0123456789
    I found that if the length of one string equals 14, then the sql will failed as the first sentence.

    If you need to check the validity of DUAL then you have:
    Select count(1) from DUAL ;
    NOT
    Select * from DUAL;
    If you find more than 1, then
    delete from dual;
    insert into dual values ('x') ;
    commit;
    Then, try you offending query.

  • Compile Error: "schema 'name' does not exist

    Im trying to build a program that quereys a table in a database but i keep getting this error. Am i missing a link between the files or am i missing a line of code in my program??

    Apologies. I receive a compiler error which reads as follows;
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    java.sql.SQLSyntaxErrorException: Schema 'DEMO' does not exist
    Heres the main body of code i am trying to execute.
    public class Main {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    try{
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    }catch(ClassNotFoundException e){
    System.out.println(e);
    try{
    Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/SimpleDBDemo", "demo", "demo");
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM DEMO.Table1");
    while (rs.next()) {
    String s = rs.getString("Name");
    float n = rs.getFloat("Age");
    System.out.println(s + " " + n);
    }catch(SQLException e){
    System.err.println(e);
    I am using NetBeans IDE and have created a database under: Services->Databases-> Java DB->SimpleDBDemo.
    I have a database connection in which theres a simple table (called "TABLE1") created which contains the names and ages of two people.
    Hope this makes the problem a bit clearer.
    Any help would be greatly appreciated.

  • PL/SQL Procedure Complilation Error

    Can any one advise on the following PL/SQL Compilation errors I am receiving:<br><br>
    LINE/COL ERROR<br>
    -------- -----------------------------------------------------------------<br>
    22/1 PL/SQL: SQL Statement ignored<br>
    24/51 PL/SQL: ORA-00942: table or view does not exist<br>
    32/1 PL/SQL: SQL Statement ignored<br>
    34/30 PL/SQL: ORA-00942: table or view does not exist<br>
    40/1 PL/SQL: SQL Statement ignored<br>
    42/6 PL/SQL: ORA-00942: table or view does not exist<br><br>
    I know the tables exists and if I run the SELECT statements through SQLPLUS (without the INTO statements) they return the values as expected.<br><br>
    Procedure as below:<br><br>
    SQL> CREATE OR REPLACE PROCEDURE BS_TDF_EXTRACT AS<br>
    2 <br>
    3 v_file UTL_FILE.FILE_TYPE;<br>
    4 <br>
    5 EXTRACT_YEAR number;<br>
    6 <br>
    7 --Indicator 23 autogeneration<br>
    8 Q1_VALUE_23 number;<br>
    9 Q1_VALUE_23_PASSED_TOTAL number;<br>
    10 Q1_VALUE_23_FAILED_TOTAL number;<br>
    11 Q1_VALUE_23_TOTAL_JOBS number;<br>
    12 <br>
    13 <br>
    14 BEGIN<br>
    15 <br>
    16 --Initialise current Extract Year<br>
    17 SELECT EXTRACT(YEAR FROM SYSDATE) <br>
    18 INTO EXTRACT_YEAR<br>
    19 FROM DUAL;<br>
    20 <br>
    21 --Initialise PASSED TOTAL<br>
    22 SELECT COUNT(*) <br>
    23 INTO Q1_VALUE_23_PASSED_TOTAL<br>
    24 FROM REP_POSTINSP_OUT_GU A1, REP_JOB_INVOICED A2, REP_JOB_INDICATORS A3<br>
    25 WHERE UPPER(A1.POSTINSP_SUCC_IND) = 'P' <br>
    26 AND A1.JOB_NUMBER = A2.JOB_NUMBER<br>
    27 AND A2.JOB_NUMBER = A3.JOB_NUMBER<br>
    28 AND A2.COMPLETION_DATE BETWEEN TO_DATE('01-APR-2006') AND TO_DATE('30-JUN-2006') <br>
    29 AND A3.POST_INSPECTION_NOT_DONE IS NULL;<br>
    30 <br>
    31 --Initialise FAILED TOTAL<br>
    32 SELECT COUNT(*) <br>
    33 INTO Q1_VALUE_23_FAILED_TOTAL<br>
    34 FROM REP_POSTINSP_OUT_GU A1, REP_JOB_INVOICED A2<br>
    35 WHERE UPPER(A1.POSTINSP_SUCC_IND) = 'F' <br>
    36 AND A1.JOB_NUMBER = A2.JOB_NUMBER <br>
    37 AND A2.COMPLETION_DATE BETWEEN TO_DATE('01-APR-2006') AND TO_DATE('30-JUN-2006');<br>
    38 <br>
    39 --Initialise TOTAL JOBS<br>
    40 SELECT COUNT(DISTINCT JOB_NUMBER)<br>
    41 INTO Q1_VALUE_23_TOTAL_JOBS<br>
    42 FROM REP_JOB_INVOICED;<br>
    43 <br>
    44 --Initialise Indicator Value<br>
    45 Q1_VALUE_23:= (Q1_VALUE_23_PASSED_TOTAL + Q1_VALUE_23_FAILED_TOTAL)/Q1_VALUE_23_TOTAL_JOBS;<br>
    46 <br>
    47 v_file := UTL_FILE.FOPEN(location => '/tmp',<br>
    48 filename => 'bs_imported_values.txt',<br>
    49 open_mode => 'W',<br>
    50 max_linesize => 32767);<br>
    51 <br>
    52 UTL_FILE.PUT_LINE(v_file, 'Q1' || EXTRACT_YEAR || '23' || Q1_VALUE_23 || '\r\n');<br>
    53 <br>
    54 UTL_FILE.FCLOSE(v_file);<br>
    55 <br>
    56 END BS_TDF_EXTRACT;<br>
    57 /<br><br>
    Warning: Procedure created with compilation errors.<br><br>
    SQL> show errors;<br>
    Errors for PROCEDURE BS_TDF_EXTRACT:<br><br>
    LINE/COL ERROR<br>
    <br>22/1 PL/SQL: SQL Statement ignored<br>
    24/51 PL/SQL: ORA-00942: table or view does not exist<br>
    32/1 PL/SQL: SQL Statement ignored<br>
    34/30 PL/SQL: ORA-00942: table or view does not exist<br>
    40/1 PL/SQL: SQL Statement ignored<br>
    42/6 PL/SQL: ORA-00942: table or view does not exist<br>

    go to sql prompt and look for desc of these and if they are not available get permissions,DB link what ever may be required to access it can be the only possibility REP_POSTINSP_OUT_GU A1, REP_JOB_INVOICED A2, REP_JOB_INDICATORS A3

  • Why compilation error--when trying to access the table from itcsi schema

    Hi,
    when querying the table from itcsi.app iam able to see the data but used in proc saying invalid table name. Whats the problem
    when declared p_app_i_old app.app_i%type----It is throwing pls-00201 error
    1 Create or replace procedure Test_insert(p_app_i_old integer,
    2 p_app_i_new integer,
    3 p_APP_ISAC_CPT_I varchar2)
    4 is
    5 cursor c1 is
    6 select distinct table_name,owner
    7 from all_tab_columns
    8 where owner = 'ITCSI' and column_name='APP_I';
    9 t_tablename varchar2(25);
    10 t_string varchar2(300);
    11 t_num number;
    12 Begin
    13 For c2 in c1 loop
    14 t_num := 0;
    15 t_string := 'SELECT count(*) FROM ' || c2.owner ||'.'||c2.table_name||' WHERE APP_I = '||p_
    16 execute immediate t_string into t_num;
    17 if t_num > 0 then
    18 -- dbms_output.put_line('The table name is '||c1_rec.table_name);
    19 if c2.Table_name = 'APP' Then
    20 INSERT INTO itcsi.App
    21 SELECT p_app_i_new,
    22 app_acrnym_c,
    23 app_x,
    24 app_desc_t,
    25 app_ipads_t,
    26 app_prdcn_stat_t,
    27 app_prdcn_stat_d,
    28 app_isd_tier_c,
    29 app_bus_cont_c,
    30 app_extnl_cstm_c,
    31 app-ecrpt_lvl_c,
    32 app_isac_cpt_i,
    33 dsw_gpn_i,
    34 ed_cntnt_srce_t,
    35 usr_upd_uunm_i,
    36 ed_upd_m
    37 FROM itcsi.APP
    38 WHERE app_i = p_app_i_old;
    39 elsif c2.Table_name = 'APP_CETRN' Then
    40 Insert into itcsi.APP_CETRN
    41 select p_app_i_new,
    42 app_cetrn_i,
    43 app-curr_cmplnc_t,
    44 app_rqr_cmplnc_t,
    45 dsw_gpn_i,
    46 ed_cntnt_srce_t,
    47 usr_upd_uunm_i,
    48 ed_upd_m
    49 FROM itcsi.APP_CETRN
    50 WHERE app_i = p_app_i_old;
    51 elsif c2.Table_name = 'APP_GPC' Then
    52 Insert into itcsi.APP_GPC
    53 select p_app_i_new,
    54 gpc_dpnt_x,
    55 gpc_elemy_x,
    56 pro_i,
    57 dsw_gpn_i,
    58 ed_cntnt_srce_t,
    59 usr_usr_upd_uunm
    60 FROM itcsi.APP_GPC
    61 WHERE app_i = p_app_i_old;
    62 End if;
    63 End if;
    64 End loop;
    65 --Commit;
    66* End;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TEST_INSERT:
    LINE/COL ERROR
    20/2 PL/SQL: SQL Statement ignored
    37/23 PL/SQL: ORA-00942: table or view does not exist
    40/2 PL/SQL: SQL Statement ignored
    Thanks

    how do i check the grant?
    if am in my own schema,how do i connect to itcsi
    schema?if you are using a schema other than the ITCSI schema, you need to login as ITCSI. or if you have dba user account you can grant a privilege of
      GRANT ALL on ITCSI.APPS to <other SCHEMA>;

  • XSLT compile error.

    I am getting an XSLT compile error on this code: 
    // Load the style sheet.
    XslCompiledTransform xslt = new XslCompiledTransform();
    xslt.Load("style1.xsl");
    Here is the code in it's entirety:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;
    using System.Data.OleDb;
    using System.Xml;
    using System.Xml.Xsl;
    using System.Xml.XPath;
    namespace CSVImporter
    public partial class CSVImporter : Form
    //const string xmlfilename = @"C:\Users\fenwky\XmlDoc.xml"; - file name and location of xml file
    const string xmlfilename = @"C:\Users\fenwky\XmlDoc.xml";
    // New code
    //const string xmlfilename = @"C:\Users\fenwky\XmlDoc.xml"; - file name and location of xsl file
    const string stylesheetsimple = @"C:\Users\fenwky\style1.xsl";
    //const string xmlfilecomplex = @"C:\Users\fenwky\XmlDoc2.xml";
    const string xmlfilecomplex = @"C:\Users\fenwky\XmlDoc2.xml";
    DataSet ds = null;
    public CSVImporter()
    InitializeComponent();
    // Create a Open File Dialog Object.
    openFileDialog1.Filter = "csv files (*.csv)|*.csv|All files (*.*)|*.*";
    openFileDialog1.ShowDialog();
    string fileName = openFileDialog1.FileName;
    //doc.InsertBefore(xDeclare, root);
    // Create a CSV Reader object.
    CSVReader reader = new CSVReader();
    ds = reader.ReadCSVFile(fileName, true);
    dataGridView1.DataSource = ds.Tables["Table1"];
    private void WXML_Click(object sender, EventArgs e)
    WriteXML();
    public void WriteXML()
    StringWriter stringWriter = new StringWriter();
    ds.WriteXml(new XmlTextWriter(stringWriter), XmlWriteMode.WriteSchema);
    string xmlStr = stringWriter.ToString();
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(xmlStr);
    XmlDeclaration xDeclare = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    doc.InsertBefore(xDeclare, doc.FirstChild);
    // Test code //
    // Load the style sheet.
    XslCompiledTransform xslt = new XslCompiledTransform();
    xslt.Load("style1.xsl");
    // Test code //
    // Transform the file and output an HTML string.
    string HTMLoutput;
    StringWriter writer = new StringWriter();
    xslt.Transform("XmlDoc.xml", null, writer);
    HTMLoutput = writer.ToString();
    writer.Close();
    // Create a procesing instruction.
    XmlProcessingInstruction newPI;
    // Stylesheet
    // String PItext = "<abc:stylesheet xmlns:abc=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    String PItext = "<xsl:stylesheet xmlns:xls=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    // newPI = doc.CreateProcessingInstruction("abc:stylesheet", PItext);
    newPI = doc.CreateProcessingInstruction("xls:stylesheet", PItext);
    doc.InsertAfter(newPI, doc.FirstChild);
    // Save document
    doc.Save(xmlfilename);
    private void btExportComplexXML_Click(object sender, EventArgs e)
    WriteXMLComplex();
    public void WriteXMLComplex()
    // Creates stringwriter
    StringWriter stringWriter = new StringWriter();
    ds.WriteXml(new XmlTextWriter(stringWriter), XmlWriteMode.WriteSchema);
    string xmlStr = stringWriter.ToString();
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(xmlStr);
    XmlDeclaration xDeclare = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    doc.InsertBefore(xDeclare, doc.FirstChild);
    // Create a procesing instruction.
    XmlProcessingInstruction newPI;
    // Uses XML transformation.
    String PItext = "<abc:stylesheet xmlns:abc=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">";
    newPI = doc.CreateProcessingInstruction("xsl:stylesheet", PItext);
    doc.InsertAfter(newPI, doc.FirstChild);
    // Saves document.
    doc.Save(xmlfilecomplex);
    //Creates a CSVReader Class
    public class CSVReader
    public DataSet ReadCSVFile(string fullPath, bool headerRow)
    string path = fullPath.Substring(0, fullPath.LastIndexOf("\\") + 1);
    string filename = fullPath.Substring(fullPath.LastIndexOf("\\") + 1);
    DataSet ds = new DataSet();
    try
    if (File.Exists(fullPath))
    string ConStr = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}" + ";Extended Properties=\"Text;HDR={1};FMT=Delimited\\\"", path, headerRow ? "Yes" : "No");
    string SQL = string.Format("SELECT * FROM {0}", filename);
    OleDbDataAdapter adapter = new OleDbDataAdapter(SQL, ConStr);
    adapter.Fill(ds, "TextFile");
    ds.Tables[0].TableName = "Table1";
    foreach (DataColumn col in ds.Tables["Table1"].Columns)
    col.ColumnName = col.ColumnName.Replace(" ", "_");
    catch (Exception ex)
    MessageBox.Show(ex.Message);
    return ds;

    Hi Kristin,
    Yes, the error looks the same:
    Here is the style.xsl file:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:apply-templates select="book"/>
    <HTML>
    <BODY>
    <TABLE BORDER="2">
    <TR>
    <TD>Item_Code</TD>
    <TD>Item_Description</TD>
    <TD>Current_Count</TD>
    <TD>On_Order</TD>
    </TR>
    <xsl:template select="book"/>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match="book">
    <TR>
    <TD><xsl:value-of select="Item_Code"/></TD>
    <TD><xsl:value-of select="Item_Description"/></TD>
    <TD><xsl:value-of select="Current_Count"/></TD>
    <TD><xsl:value-of select="On_Order"/></TD>
    </TR>
    </xsl:template>
    </xsl:stylesheet>
    The XML file isn't saving (generating) on Click. Thank for you for your help.
    @Kylee,
    Here is the right format XSL file, Please check and test again.
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="book">
    <HTML>
    <BODY>
    <TABLE BORDER="2">
    <TR>
    <TD>Item_Code</TD>
    <TD>Item_Description</TD>
    <TD>Current_Count</TD>
    <TD>On_Order</TD>
    </TR>
    <xsl:apply-templates select="book"/>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match="book">
    <TR>
    <TD>
    <xsl:value-of select="Item_Code"/>
    </TD>
    <TD>
    <xsl:value-of select="Item_Description"/>
    </TD>
    <TD>
    <xsl:value-of select="Current_Count"/>
    </TD>
    <TD>
    <xsl:value-of select="On_Order"/>
    </TD>
    </TR>
    </xsl:template>
    </xsl:stylesheet>
    By the way, you also could check by yourself. Add a new XLS file in VS2013, It will help you check all the errors.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.
    Thanks Kristen. I have checked the file and it now reads. However, I have another error now. The XML file isn't saving and I am getting this error:
    Could not find file 'C:\Users\fenwky\documents\visual studio 2013\Projects\CSV Importer\CSV Importer\bin\Debug\XmlDoc.xml'.
    For some reason it's not writing the file (but trying to read it?) and I am not sure what I am doing wrong.
    Here is the screen shot:
    private void WXML_Click(object sender, EventArgs e)
    WriteXML();
    public void WriteXML()
    StringWriter stringWriter = new StringWriter();
    ds.WriteXml(new XmlTextWriter(stringWriter), XmlWriteMode.WriteSchema);
    string xmlStr = stringWriter.ToString();
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(xmlStr);
    XmlDeclaration xDeclare = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
    doc.InsertBefore(xDeclare, doc.FirstChild);
    // Load the style sheet.
    XslCompiledTransform xslt = new XslCompiledTransform();
    xslt.Load("style1.xsl");
    // Transform the file and output an HTML string.
    string HTMLoutput;
    StringWriter writer = new StringWriter();
    xslt.Transform("XmlDoc.xml", null, writer);
    HTMLoutput = writer.ToString();
    writer.Close();
    var piText = "type=\"text/xsl\" href=\"style1.xsl\"";
    var newPI = doc.CreateProcessingInstruction("xml-stylesheet", piText);
    doc.InsertAfter(newPI, doc.FirstChild);
    // Save document
    doc.Save(xmlfilename);
    Thank you again Kristen.

Maybe you are looking for

  • Dynamic structure creating based on the input parameter

    Hi all,              How to create a dynamic structure based on the input parameter given in the selection screen. I have a file path given and it contains three fields in common, but after that depending upon the input given the fields get changed.

  • Spliting Sales Order

    Hello experts , Pl suggest , How to  split Sales Order. When Customer needs delivery urgently ( Partial qty urgently by Air ) and rest by normal mode. They want to Split this Sales Order into two line levels and indicate Air Freight charges in one. R

  • Need a quick help with miniracer

    Miniracer does not run on 64 bit. I contacted upstream, and they say it should work on 32 bit, the error is connected with 64 bit. They asked me to confirm this, but I dont have a 32 bit archlinux near me. Could you please test the package on 32 bit

  • On which port number WDS server will listen & service when installing on server which is also DHCP server?

    hi frineds in documents we read when we install WDS on the server which is also DHCP server, we must select this check mark : "do not listen on port 67" it means we instruct the WDS service not to listen on port UDP 67  to avoid a port conflict betwe

  • Collective goods issue in production

    Hello All, We want to do a collective goods issue in production. Is there a chance in SAP that we can do a goods issue by supply area or MRP controller. We don't want to enter manually the group of production orders in MB1A or don't want to do backfl