Function compiled with error

can someone please assist
CREATE OR REPLACE FUNCTION HR.is_leap_year (   date_in IN DATE)
    RETURN NUMBER
    AS   
    result NUMBER := 0;   
BEGIN
        SELECT
                    CASE WHEN (
                                MOD(EXTRACT(YEAR FROM date_in), 4) = 0 AND MOD(EXTRACT(YEAR FROM  date_in) ,100) != 0)                               
                                    OR MOD(date_in, 400) = 0   THEN 1   ELSE 0  END AS bit
                    INTO result
         FROM DUAL;
            RETURN result;
END is_leap_year ;
/

ricard888 wrote:
can someone please assistDo not use SQL when SQL is not needed - context switching from the PL/SQL engine to the SQL engine can be expensive.
Do not code in ugly uppercase. There is NO programming standard in use today that states that reserved words need to be coded in uppercase. Have a look at Java standards, .Net standards, Pascal standards, C/C++ standards.
The function should look as follows (assuming it is a wise decision to return a number when a boolean or Y/N flag value is expected) - as already shown previously in the thread:
SQL> create or replace function isLeapYear( d date ) return integer is
  2  begin
  3          return(
  4                  case
  5                          when    ( mod(extract(year from d),4) = 0 and
  6                                    mod(extract(year from d),100) != 0
  7                                  )
  8                                  or
  9                                  mod(extract(year from d),400) = 0 then
10                                  1
11                  else
12                          0
13                  end
14          );
15  end;
16  /
Function created.
SQL>
SQL> select isLeapYear(sysdate) as BIT from dual;
       BIT
         1
SQL> select isLeapYear(sysdate+300) as BIT from dual;
       BIT
         0
SQL>

Similar Messages

  • The Function TRACKIT65.SMSP_CHECKINANSWER has been compiled with errors

    I am trying to create a function, as listed below, and when it compiles it compiles with errors. The errors it lists are as follows:
    1) Line # = 1 Column # = 187 Error Text = PL/SQL: SQL Statement ignored
    2) Line # = 1 Column # = 222 Error Text = PL/SQL: ORA-00906: missing left parenthesis
    Here is the create function statement:
    CREATE FUNCTION "TRACKIT60"."SMSP_CHECKINANSWER" (p_answer_id NUMBER, p_user_id NUMBER, p_edit_token VARCHAR2, p_wasModified VARCHAR2 := 'N') RETURN NUMBER IS v_chkout VARCHAR(32);
    BEGIN
    SELECT CAST(checked_out AS VARCHAR2) INTO v_chkout FROM smAnswers
    WHERE answer_id = p_answer_id;
    IF (v_chkout = p_edit_token) THEN
    IF (p_wasModified = 'Y') THEN
    UPDATE smAnswers
    SET checked_out = NULL, edited_by = p_user_id, published_on = SYSDATE
    WHERE answer_id = p_answer_id;
    ELSE
    UPDATE smAnswers
    SET checked_out = NULL
    WHERE answer_id = p_answer_id;
    END IF;
    RETURN 0;
    ELSE
    RETURN 1;
    END IF;
    END smsp_CheckInAnswer;
    If anyone can see what I am missing I would really appreciate it.
    Thank you
    Chicago

    One thing your code is missing is formatting, enclosing code in { code } without spaces will allow formatting.
    Another is the precision of the VARCHAR2 size in your CAST statement.
    ME_XE?select cast('hi' as varchar2) from dual;
    select cast('hi' as varchar2) from dual
    ERROR at line 1:
    ORA-00906: missing left parenthesis
    Elapsed: 00:00:00.03
    ME_XE?select cast('hi' as varchar2(10)) from dual;
    CAST('HI'ASVARCHAR2(10))
    hi
    1 row selected.
    Elapsed: 00:00:00.01

  • Compiled with errors ... but "no errors" ... ?!

    Hi all,
    I am going crazy here.
    I am trying to migrate our code to 10g ...
    I have an issue with a package. I compile it with SQLDeveloper (hate that thing) and get some warnings, but no errors. Trying to start the package in sqlplus I get the message "invalid package" ...
    Then I type "alter package xxx compile debug" and get the info "compiled with errors". But when I type "show errors" it says "no errors" ...
    Does someone know how I teach this thing some sense?
    Thanks and merry Xmas and stuff,
    Steffi

    Usage: SHOW ERRORS [{ FUNCTION | PROCEDURE | PACKAGE
    |
    PACKAGE BODY | TRIGGER | VIEW
    | TYPE | TYPE BODY | DIMENSION
    | JAVA SOURCE | JAVA CLASS } [schema.]name]
    how err schema.package_nameRegards
    SinghThis really did it, thank you so much!!
    Unfortunately it does not really help me ... only some warnings on bind-variables ...
    LINE/COL ERROR
    110/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    110/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    114/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    114/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    LINE/COL ERROR
    118/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    118/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    122/24   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    122/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
    LINE/COL ERROR
             Spaltentyp führen
    186/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    186/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    187/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    LINE/COL ERROR
    187/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    227/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    229/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    229/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    LINE/COL ERROR
    230/12   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    230/34   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen
    357/53   PLW-07204: Konvertierung vom Spaltentyp weg kann zu einem
             nicht-optimalen Abfrageplan führen
    357/70   PLW-07204: Konvertierung vom Spaltentyp weg kann zu einem
    LINE/COL ERROR
             nicht-optimalen Abfrageplan führen
    364/30   PLW-07202: Bind-Typ würde zu einer Konvertierung weg vom
             Spaltentyp führen

  • Planning function ended with errors

    Hi Folks,
    Issue: While Executing The Planning Sequnce it is througing me Planning Function Ended with Errors.
    I have one existing Planning Sequence which contain the Filter and Planning Copy Function. And also Variable input ( two variables 1 is Profict Center and 2nd one is Fiscal Year)
    First i was tried to execute the Planning Sequece it througing me error message saying as in below:-
    Values entered are invalid; check these values again
    Variables contain invalid values.
      Specify a value for variable Fiscal Year (Single Value Entry, Required)
      You have to enter variables before you execute
    Then i have entered Fiscal year value in the Planning Sequece>Variable Input>select the Fiscal Year Variable>Input help>selected the 2008-->ok. Now then Fiscal year variable is showing 2008.
    And then i was executed once again here Planning Sequnce it is througing me Planning Function Ended with Errors.
    Here is cross checked Filter area associated Variables( two variables 1 is Profict Center and 2nd one is Fiscal Year).
    1.Profit Center Variable: Containing the default value is 1000
    2.Fiscal Year Variable : Does not maintained any default values.
    Can any one provide your v

    Hi Venkat,
    Please execute the planning function with Execution with Trace option.
    Verify the planning function particularly from Values.
    Also some simple tricks:
    1. Try with some other values.eg. FisYear 2007. ( Check in database)
    2. Save the variant in variable input panel & then execute.
    Hope it helps,
    Shamkant

  • Procedure with recursive query working in 11g compiles with error in 10g

    Hi, All,
    I have a procedure that recursively selects tree-like table (with ID-ParentID relationship). Query itself works perfectly and exactly like I need in 11g and procedure containing it compiles well. But when I try to create the same procedure in 10g then I get a message that procedure compiled with error. I have no other suspicions but on the WITH part of the procedure.
    The exact query is here (destination_tariff_zones is the tree-like table which refers to itself by parent_destination_tariff_zone_id):
    + open dtzl_cur FOR
    with dtree (nm, iid, alevel, wldcard, dtzindex)
    as (select dtz.iname, dtz.iid, 0, dtz.wildcard, rcdi.iindex
    from destination_tariff_zones dtz, rating_cube_dimension_indices rcdi, rating_cube_dimensions rcd
    where dtz.parent_tariff_zone_id is null and
    dtz."rc_dimension_index_id" = rcdi.iid and
    rcdi."rc_dimension_id" = rcd.iid and
    rcd.rating_cube_id = rc_id and
    rcd.dimension_type_id = dim_type
    union all
    select dtz.iname, dtz.iid, dtree.alevel + 1,
    cast ((dtree.wldcard || dtz.wildcard) as varchar2(20)), rcdi.iindex
    from dtree, destination_tariff_zones dtz, rating_cube_dimension_indices rcdi, rating_cube_dimensions rcd
    where dtree.iid = dtz.parent_tariff_zone_id and
    dtz."rc_dimension_index_id" = rcdi.iid and
    rcdi."rc_dimension_id" = rcd.iid and
    rcd.rating_cube_id = rc_id and
    rcd.dimension_type_id = dim_type)
    select iid, nm, wldcard, dtzindex
    from dtree
    order by wldcard;+
    Is there any difference between how 11g and 10g handle WITH statements?
    Please advise.
    Thank you very much in advance,
    Max

    Max Afanasiev wrote:
    then is there any alternative to implement what I need?You can look at using CONNECT BY to emulate a recursive query. If you can post the following we may be able to help:
    1. Sample data in the form of CREATE / INSERT statements.
    2. Expected output
    3. Explanation of expected output (A.K.A. "business logic")
    4. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • PL SQL Compilation with error

    Hi guys,
    Sorry that i'm quite new to PL SQL and oracle. I having some issue on pl sql function as i implementing a CREATE OR REPLACE FUNCTION. Below is my syntax for my function.
    create or replace function auth_Name ( v_auth_state IN varchar)
    return varchar2 is
    v_authName varchar;
    BEGIN
    select name into v_authName from employee
    where
    name= v_auth_state;
    return v_authName;
    end auth_Name;
    But whenever I compile it will show "Function created with compilation errors". Isn't it supposed to show "Function created successfully"? anyone can guide me along with this?

    Hi,
    Welcome to the forum!
    The immediate problem is that the local variable v_authName can't be declared as just VARCHAR. That's how you give the datatype of an argument (like v_auth_state) or the function's return type, but the local variable has to be given a length.
    You could say something like:
    v_authName varchar (20);but, since v_authName has to match a specific column from a specific table, it's better to define it as that column's type and length directly.
    You might want to do the same for the argument and the return type, like this:
    create or replace function auth_Name ( v_auth_state IN employee.name%TYPE)
    return employee.name%TYPE is
         v_authName     employee.name%TYPE;
    BEGIN
         select      name
         into      v_authName
         from     employee
         where
              name     = v_auth_state;
         return v_authName;
    end auth_Name;
    show errorsIt looks the function is just returning it's argument. Is that what you want? If not, describe what the function is supposed to do.
    As written, the function will have a run-time error if there is not exactly one row in the employee table with the given name. What would you like to happen if there is no matching row in the table? How about if there are several?

  • EvtFormatMessage function fails with error code 15033 (ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND) on non-English Windows OS

    I have an App which subscribes to Windows events and if it is matching the filter criteria, it reports it.
    I have observed a strange problem on non-English windows 2008 OS. 
    If the Windows event is of source = EventLog (e.g. Event ID 1102: Security log was cleared), then EvtFormatMessage fails with error code 15033. But if the event is of any other source (e.g. Microsoft Security Auditing), then it works absolutely fine.
    While calling EvtOpenPublisherMetadata, I have created locale ID as MAKELCID(MAKELANGID(0x09,0x01) i.e. Primary language = LANG_ENGLISH and Sub Language = SUBLANG_DEFAULT.
    I want events details in English only and hence primary language is put as English. If I change this macro to have primary language as LANG_CHINESE and sub language as SUBLANG_CHINESE_SIMPLIFIED, then it works fine but gives back event details in native
    OS language (Chinese in this case). That's not a desirable output for me.
    Following is the way I'm calling EvtFormatMessage 
    EvtFormatMessage(hMetaData, hEvent[0], -1, 0, NULL,
                                   1 /* EvtFormatMessageEvent */, 
                                   m_pTextBufferSize/sizeof(WCHAR),
                                   m_pTextBuffer, &dwBuffUsed);
    A work-around for this is to install a MUI pack for English language. If the MUI pack is installed then it works fine. But I cannot enforce users to have this pack installed on all their systems.
    My question is  why this API is working for some set of Events whereas failing for some specific Events? Am I doing something wrong?
    Any help would be appreciated.
    TIA,
    Regards,
    Yogesh
     

    Was on vacation and hence the delay in replying.
    As mentioned earlier, while calling EvtOpenPublisherMetadata, I have created locale ID as MAKELCID(MAKELANGID(0x09,0x01)
    i.e. Primary language = LANG_ENGLISH and Sub Language = SUBLANG_DEFAULT.  If I change this macro
    to have primary language as LANG_CHINESE and sub language as SUBLANG_CHINESE_SIMPLIFIED, then it works fine but gives back event details in native OS language (Chinese in this case).
    This is not an option for me as I want event details in English language only.
    Regards,
    Yogesh
    Regards, Yogesh

  • Package compile faile with error ORA-03113: end-of-file on communication..

    Hi There,
    We're trying to compile a package and we're getting this error that we're not sure how to debug and/or tackle. Your assistance is highly appreciated.
    create or replace
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 4252
    Session ID: 1149 Serial number: 5910
    The package use to compile without any issues; also we have it working in other environments. We can't see any differences at this stage.
    Oracle Version:11.2.0.1 x64
    OS: Windows 2008 Server R2
    Thanks in advance for your help.
    Thanks

    I have tried dropping the package and re-compiling it but to no avail. I can compile other packages/procedures/functions without any issues.
    Also, trying to run either EXEC UTL_RECOMP.recomp_parallel(4, 'SCHEMA_NAME'); or @?/rdbms/admin/UTLRP.SQL gives the following erros:
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 7040
    Session ID: 388 Serial number: 9039
    ERROR:
    ORA-03114: not connected to ORACLE
    DOC> The following query reports the number of objects that have compiled
    DOC> with errors (objects that compile with errors have status set to 3 in
    DOC> obj$). If the number is higher than expected, please examine the error
    DOC> messages reported with each object (using SHOW ERRORS) to see if they
    DOC> point to system misconfiguration or resource constraints that must be
    DOC> fixed before attempting to recompile these objects.
    DOC>#
    ERROR:
    ORA-03114: not connected to ORACLE
    DOC> The following query reports the number of errors caught during
    DOC> recompilation. If this number is non-zero, please query the error
    DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
    DOC> are due to misconfiguration or resource constraints that must be
    DOC> fixed before objects can compile successfully.
    DOC>#
    ERROR:
    ORA-03114: not connected to ORACLE
    ERROR:
    ORA-03114: not connected to ORACLE
    ERROR:
    ORA-03114: not connected to ORACLE
    ERROR:
    ORA-03114: not connected to ORACLE
    ERROR:
    ORA-03114: not connected to ORACLE

  • Trigger compile with after migrated from 8i to 10g

    Hi All,
    We try to migrate a 8i database to 10g by using the exp and imp. All tables and data are already migrated by imp. During the imp, there are errors said the trigger compile with errors.
    When login to the em to check, I found these 2 errors.
    Line # = 2 Column # = 1 Error Text = PL/SQL: SQL Statement ignored
    Line # = 2 Column # = 60 Error Text = PL/SQL: ORA-00942: table or view does not exist
    My trigger is a very simple one:
    BEGIN
    Select TB_COUNTER_SEQ.NEXTVAL INTO :NEW.INCREMENT_NUM FROM DUAL;
    END;
    And I'm sure the "TB_COUNER_SEQ" is there.
    Do I need to change anything on the trigger when migrating from 8i?
    In fact, besides this trigger, all other trigger imp to this schema are having the same error. The schema in the 10g is a newly created one, is there any special right I need to create grant to this new user?
    Thanks a lot.
    Mike

    Hi, Mike,
    user3211655 wrote:
    Hi All,
    We try to migrate a 8i database to 10g by using the exp and imp. All tables and data are already migrated by imp. During the imp, there are errors said the trigger compile with errors.
    When login to the em to check, I found these 2 errors.
    Line # = 2 Column # = 1 Error Text = PL/SQL: SQL Statement ignored
    Line # = 2 Column # = 60 Error Text = PL/SQL: ORA-00942: table or view does not exist
    My trigger is a very simple one:
    BEGIN
    Select TB_COUNTER_SEQ.NEXTVAL INTO :NEW.INCREMENT_NUM FROM DUAL;
    END;
    And I'm sure the "TB_COUNER_SEQ" is there.
    Do I need to change anything on the trigger when migrating from 8i?
    In fact, besides this trigger, all other trigger imp to this schema are having the same error. The schema in the 10g is a newly created one, is there any special right I need to create grant to this new user?Grant the necessary privileges on the tables (and any other objects used, like sequences) directly to the owner of the triggers. Privileges granted to a role don't count in AUTHID OWNER stored procedures; the privileges have to be granted to the owner of the stored procedure (or to PUBLIC).
    It the error is occurring at position 60, then it looks like you don't have privileges on dual. Login as SYS and
    GRANT SELECT ON dual TO PUBLIC;You may need synonyms (perhaps public synonyms) for the objects, too.

  • Warning: Function created with compilation errors. ???

    I created a function with a warning:
    Warning: Function created with compilation errors.
    I'd like to know more detailed information about this warning, how to find them?
    If only with this warning, I don't know how to correct the definition of the function.
    BTW, because it is a warning, I just try to run the sql stmt which will call this function:
    SQL> select strdiff(ename, 'FOR') from emp;
    select strdiff(ename, 'FOR') from emp
    ERROR at line 1:
    ORA-06575: Package or function STRDIFF is in an invalid state.
    /* strdiff is the name of function */
    Thanks in advance!

    Hi,
    I think that your posting may be more suited to the PL/SQL forum.
    after the function is created with errors you should try the command:
    show err
    or
    show errors
    this should at least give you some idea of what is wrong.
    regards Michael

  • Basic C function ends up with error when trying to compile + example

    Hello Guys,
    Gotta problem here with normal function in c:
    My configuration:
    OS 10.8
    Xcode 5.0.2
    Code:
    void  printMessage (void) {
    NSLog(@"Test");
    printMessage();
    Note that this ends up with error:
    ProcessPCH /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.pch test/test-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
        cd /Users/cistyprofil/Documents/CA/test
        setenv LANG en_US.US-ASCII
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -Wno-sign-conversion -iquote /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-generated-files.h map -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-own-target-head ers.hmap -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-all-target-head ers.hmap -iquote /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-project-headers.h map -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchai n/usr/include -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/DerivedSources/i386 -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/DerivedSources -F/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Products/Debug --serialize-diagnostics /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.dia -MMD -MT dependencies -MF /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.d -c /Users/cistyprofil/Documents/CA/test/test/test-Prefix.pch -o /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.pch
    error: -fobjc-arc is not supported on platforms using the legacy runtime
    Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang failed with exit code 1
    Please advise.

    Try this to start with:
    #include <stdio.h>
    int main(int argc, const char * argv[])
    // insert code here...
    printf("Hello, World!\n");
        return 0;
    This is the default source code you see when you create a command line tool using XCode.

  • PCC-S-02014 error while compiling with in Sun Solaris

    We are porting our application from HP-UX to Sun Solaris and as part of that I am trying the compile a Pro*C program in Sun Solaris using SUNWspro C++ compiler. Precompiling is failing with following error.
    PRECOMP set: /u01/app/oracle/product/10.2.0/bin/proc dbms=native code=cpp mode=ansi include=/u01/app/oracle/product/10.2.0/precomp
    ireclen=255 oreclen=255
    define=__sparc define=__SUNPRO_C include=/usr/include include=. include=/u01/app/SUNWspro/prod/include/CC/stlport4 include=/u01/app/oracle/product/10.2.0/rdbms/public/ include=/u01/app/oracle/product/10.2.0/network/public/ include=/u01/app/oracle/product/10.2.0/rdbms/demo/ errors=yes select_error=no
    sqlcheck=limited ltype=NONE
    release_cursor=no hold_cursor=no
    Pro*C/C++: Release 10.2.0.3.0 - Production on Thu Dec 18 03:09:59 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /u01/app/oracle/product/10.2.0/precomp/admin/pcscfg.cfg
    Syntax error at line 44, column 30, file /u01/app/SUNWspro/prod/include/CC/stlport4/algorithm:
    Error at line 44, column 30 in file /u01/app/SUNWspro/prod/include/CC/stlport4/a
    lgorithm
    # include STLPNATIVE_HEADER(algorithm)
    .............................1
    PCC-S-02014, Encountered the symbol "(" when expecting one of the following:
    : [ ] + / . .. an identifier, a numeric constant, newline,
    define, elif, else, endif, error, if, ifdef, ifndef, include,
    line, pragma, undef, exec, sql, begin, end, var, type,
    oracle, an immediate preprocessor command, a C token, create,
    function, package, procedure, trigger, or, replace,
    Normal C++ files are getting compiled with out eny issues. This particular file is having functions written in C fashion. Any idea what is missing in the compiler option.
    regards
    Vinu

    Hi Vinu,
    I'm not sure if this is still an issue for you. When I have encountered issues like this with Pro*C I have ended up specifying parse=none to the proc command and then putting all declarations between "EXEC SQL BEGIN DECLARE SECTION" and "EXEC SQL END DECLARE SECTION" markers. I have also moved any "special" declarations into a specific header file and then placed the "#include <special header file>" inside the declare section as well.
    Perhaps that will help a bit,
    Regards,
    Mark

  • 11g Instaclient, Centos Error Module compiled with module API=20050922

    While we are trying to connect remote 11g database we are getting errors
    a. httpd log
    PHP Warning: PHP Startup: fileinfo: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0
    PHP Warning: PHP Startup: memcache: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0
    b. Browser
    Fatal error: Call to undefined function oci_connect() in /usr/www/developers/checkConnectServer.php on line 11
    We have trying from a combination Centos 5.4, PHP 5.2.10, oracle-instantclient-basic-11.1.0.1-1.i386, oci8-1.4.2
    Kindly help if some one knows fix; Thanks in advance

    If you have a model project that has objects referenced by the view controller/UI project then you need to explicitly include them in the deployment. Unlike in embedded OC4J they wont be automatically included.
    Create an ADF library deployment profile in the model project and include the generated library in your UI project war file. You can add this jar to the project Libraries/Classpath then make sure it is included in the WEB-INF/lib Contributors list.

  • Function compilation errors?

    In sys schema the status of a functions get_domain_index_tables and get_operated_qty is shown invalid. I'm continuously trying to get errors but in vain. Recompilation is always successsful with compilation errors.
    HELP please.

    Simple Idea:
    If your function in the Package, try to compile just Package Header first
    (You can copy & paste from your script) and then do
    SHOW ERRORS; or SELECT * FROM USER_ERRORS;
    If any Errors, fix them, compile again.
    (Package body won't compile without Errors until header is compiled without them)
    Then try to compile Package Body ALTER PACKAGE TEST_PKG COMPILE BODY;
    and query again (SHOW ERRORS; or SELECT * FROM USER_ERRORS;)

  • The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.

    I am experiencing this error with one of our cluster environment. Can anyone help me in this issue.
    The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.
    Thanks,
    Venu S.
    Venugopal S ----------------------------------------------------------- Please click the Mark as Answer button if a post solves your problem!

    Hi Venu S,
    Based on my research, you might encounter a known issue, please try the hotfix in this KB:
    http://support.microsoft.com/kb/928385
    Meanwhile since there is less information about this issue, before further investigation, please provide us the following information:
    The version of Windows Server you are using
    The result of SELECT @@VERSION
    The scenario when you get this error
    If anything is unclear, please let me know.
    Regards,
    Tom Li

Maybe you are looking for

  • Upgraded to iTunes 6 - now iTunes won't work!

    I have an older G4 and have been running iTunes since I upgraded to OSX about a year and a half ago. Never any problems. Just recently got an iPod from a friend and have been using that with no probs. for about 2 weeks. I was promped to update both i

  • Questions on Lync 2010 to 2013 Addressbook Migration

    Hi Team, We are in the process of migrating the users from Lync 2010 to Lync 2013 pilot pool. https://technet.microsoft.com/en-us/library/jj205160.aspx According to the above article, basically the Lync Server 2010 Address Book is migrated along with

  • EXC_BAD_ACCESS (SIGBUS) with EyeTV

    Hello, need some advice on how to track down the error below.  This only happens with EyeTV on this Mac Mini, and happens several times a week. I suspect it have something to do with Chrome running Netflix at the same time, but that could be a red he

  • Not able to edit my Sap script form using se71 ?

    I have been working on SAP Script say ZKI_FORM using se71 in polish language. Today When I try to make changes as usual, it is not allowing me to go into change mode . It is giving Error in object Editing like below. " Changes to Repository or cross-

  • Time capsule error

    My time capsule has a white strike out symbol when I try to drag & drop.