Precompilers, OCI & OCCI :: Error Implicit Conversion Of String Literal To (char) Is Deprecated?

Jan 30, 2011

i write a select statement in proc that contains 44 columns.

when i precompile it. it is showing the error: implicit conversion of string literal to "char *" is deprecated.when i compile the same select with 40 columns it is not showing any error.

but for more than 40 columns (41-44) it is showing the above error.

View 1 Replies


ADVERTISEMENT

Precompilers, OCI & OCCI :: ORA-01458 / Invalid Length Inside Variable Character String

Apr 16, 2009

I want to insert data into a RAW column in a table. The below code snippet is used for the same

OCIRaw **l_rawPtr = new OCIRaw*[10];
for(int i=0;i<10;i++)
{l_rawPtr[i] = NULL; }
int max = 0;
for(int i=0;i<10;i++)
{
OCIRawAssignBytes(l_environment, l_error, l_char, strlen((const char*)l_char), &l_rawPtr[i])

[code].....

When the statement is getting executed, i am getting the following error. Error - ORA-01458: invalid length inside variable character string

View 3 Replies View Related

Precompilers, OCI & OCCI :: Batch Error Mode?

Mar 4, 2010

what is OCI_BATCH_ERRORS and BATCH ERROR Mode ?and how the user can set it ?

View 6 Replies View Related

Precompilers, OCI & OCCI :: Oracle10g Pre Compilation Error

Apr 23, 2009

i am getting below error when i compiler a pro*c program with Oracle 10g client with IBM C compiler version 9.0 on AIX 6.1

Syntax error at line 183, column 2, file /usr/include/sys/socket.h:
....
PCC-S-02201, Encountered the symbol "sa_family_t" when expecting one of the foll
owing:
....

My pcscfg.cfg contents

sys_include=(/usr/include)
ltype=short

View 1 Replies View Related

Precompilers, OCI & OCCI :: (ORA-01480) Error While Assigning Value To A Variable?

Sep 23, 2008

I am writing a code in Proc as

<code>
#define SMSDUN_LANGID_LEN 10

-- other statements

EXEC SQL BEGIN DECLARE SECTION
char dbLanguageId[SMSDUN_LANGID_LEN + 1];
EXEC SQL END DECLARE SECTION

-- other statements

EXEC SQL EXECUTE
BEGIN
SELECT LANGUAGE_ID -- Length of this column is 10
INTO :dbLanguageId
FROM CUSTOMERATTRIBUTES

[code]...

While executing the above command, it is giving error as "ORA-01480: trailing null missing from STR bind value". Its working in some oracle versions but not in other. where exactly the problem is.

View 1 Replies View Related

Precompilers, OCI & OCCI :: PCC-F-02102 / Fatal Error While Doing C Preprocessing

Dec 22, 2009

I am getting following errors while compiling pro*c program

ystem default option values taken from: /data/OraHome/MidHome/precomp/admin/pcscfg.cfg

Syntax error at line 342, column 1, file /usr/include/ncurses/curses.h:

Error at line 342, column 1 in file /usr/include/ncurses/curses.h
* bool _notimeout; /* no time out on function-key entry? */
1
PCC-S-02201, Encountered the symbol "*" when expecting one of the following:
} char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,

Error at line 0, column 0 in file ao030cm.pc

PCC-F-02102, Fatal error while doing C preprocessing

View 1 Replies View Related

Precompilers, OCI & OCCI :: PCC-S-02014 Error While Compiling Within Sun Solaris?

Dec 18, 2008

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=.

[code]...

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 _STLP_NATIVE_HEADER(algorithm)
.............................1
PCC-S-02014, Encountered the symbol "(" when expecting one of the following:

[code]...

Normal C++ files are getting compiled with out eny issues. This particular file is having functions written in C fashion.

View 1 Replies View Related

Precompilers, OCI & OCCI :: Compilation Error When Compiling Code

Apr 2, 2009

I'm running a query similar to the one that I'm describing below -:

EXEC SQL INSERT INTO TABLE1
( C1
,C2
,C3
,C4 )
[code]....

Above query runs perfectly on SQL prompt.Same query, when being run in a Pro*C program gives compilation error-:

Error at specified line:

,( SELECT D.V3 FROM TABLE2 D WHERE D.V3 = C.V4)
.............................1
PCC-S-02201, Encountered the symbol "D" when expecting one of the following:
( ) * + - / . @ | at, day, hour, minute, month, second, year,

What are the possbile causes of error. I am using Oracle 10g on Unix.

View 1 Replies View Related

Precompilers, OCI & OCCI :: Error ID 0706-006 Cannot Find Or Open Library File

Apr 1, 2010

I have 3 code files written in ProC. I have precompiled, compiled, tested them in my local environment (Windows) & they work fine. But when I try in real environment, AIX 5.3, I can precompile them. But when I try to compile & link them with the libclntsh library I get errors. I am using a Makefile but just for testing this is the command -

xlc oraProcs oraProcs.c test_curva.c lib_util.c -I $ORACLE_HOME/precomp/public -L $LIBPATH -l libclntsh.a
Error - ld: 0706-006 Cannot find or open library file: -l libclntsh.a
ld: open(): A file or directory in the pathname does not exist

where LIBPATH = $ORACLE_HOME/lib

library libclntsh.a exists in $ORACLE_HOME/lib & has the right permissions

I also tried removing the library libclntsh.a & recreating it using the command - genclntsh When I run this command I get this warning more than once -ld: 0711-783 Warning TOC overflow TOC size: 66888 Max size: 65536 genclntsh creates the library libclntsh.a, just not sure if these warnings damage the library file and are related to my link erros in some way.

View 2 Replies View Related

Implicit Data Conversion / Join Conditions Between Number And Vrahchar2

Jun 17, 2013

In my Project, there are many queries have join conditions between Number and Vrahchar2. Will it give any wrong results or Invalid Number exception even the varchar2 column always contains the number data?

Example:
Select * from Table_t1 t1, table_t2 t2
where t1.num_col = t2.var_col
-- Here var_col always hold only numaric data.

View 1 Replies View Related

SQL & PL/SQL :: Char To Date Conversion?

Feb 7, 2013

converting a string to date, my string looks like '01022013' '04022013', I tried to_date('01022013', 'dd-mm-yyyy') but couldn't work.

View 6 Replies View Related

PL/SQL :: Bind Variable As A Literal String Value

Nov 5, 2013

Oracle Database 10g

Enterprise Edition Release 10.2.0.5.0

- ProdPL/SQL Release 10.2.0.5.0
- ProductionCORE 10.2.0.5.0 ProductionTNS for Linux: Version 10.2.0.5.0
- ProductionNLSRTL Version 10.2.0.5.0
- Production.

I have a problem when creating a dynamic statement. The problem is in the bind variable  ':OLD.CUST_NAME' ,..my question is is there an escape character to treat the bind variable as a literal string?

{code}v_str2 := '''CUST_NAMES='''||'||'|| ':OLD.CUST_NAME' ; 
 EXECUTE IMMEDIATE   'create or replace trigger trg_'  || SUBSTR (rec_cur.table_name, 1, 26) || ' before insert or update or delete on '                             || rec_cur.owner || '.' || rec_cur.table_name || '   declare   begin     if UPDATING then   FIFAPPS.ibug.log_errors('|| v_str2 ||'  );    end if;   end;';

{code} 

I want the output in a trigger something like this:{code}

if UPDATING then   FIFAPPS.ibug.log_errors('CUST_NAMES='||:OLD.CUST_NAME );{code}

View 11 Replies View Related

SQL & PL/SQL :: Existing Database Conversion From Bytes To Char?

Aug 11, 2011

What is the best way to convert an existing database table set with nls_legnth_semantic=BYTE to CHAR?

View 2 Replies View Related

SQL & PL/SQL :: Where Clause - Literal Does Not Match Format String

Feb 28, 2011

In query I have WHERE clause like this:

WHERE TO_DATE(TO_CHAR(RR.PEROFOPFROM,'DD-MON-YYYY')||RR.AIRCRAFTSTD,'DD-MON-YYYY:HH24MI') >
TO_DATE(TO_CHAR(RR.PEROFOPFROM,'DD-MON-YYYY')||RR.AIRCRAFTSTA,'DD-MON-YYYY:HH24MI')

I have data like this:

PEROFOPFROMAIRCRAFTSTD

29/03/20102150
NULL NULL
NULL NULL
30/03/20102150

When I execute the query it always gives me the error "literal does not match format string".

View 7 Replies View Related

SQL & PL/SQL :: ORA-01861 - Literal Does Not Match Format String

Dec 6, 2012

I'm trying to do data mining on a web log which recorded one day web access information from a busy web server. I imported the data into Oracle Data miner, and created a table (WEBLOG). The idea is to create a new field, i.e. session, for the users so that each session could be thought as a representative of a user-intent (aka topic). Now based on this, data mining models would be used to cluster(group) the users based on their similarity. The first step is to prepare the data which involves using SQL queries. So first, all I did was to create a function for date and time. This is the following code I used,

create or replace function ssndate(p_date in varchar2 default '03-01-18',
p_time in varchar2)
return number
$if dbms_db_version.ver_le_10 $then
deterministic
$elsif dbms_db_version.ver_le_11 $then
result_cache
$end
as
begin
return trunc((to_date(p_date||' '||p_time, 'dd-mm-yy hh24:mi:ss')
- to_date('01-01-90','dd-mm-yy')) * (86400/2400));
end ssndate;
/

The function ssndate compiled successfully.The next step I took was to create a view through the following query,

create or replace view WEBLOG_VIEWS
as
select (select ssndate(LOG_DATE, LOG_TIME) from dual) as "SESSION_DT",
C_IP,
CS_USER_AGENT,
(CS_URI_STEM||'?'||CS_URI_QUERY) as WEB_LINK
from WEBLOG;

This was successful as well. The problem is in the next step where I try to do data grouping.

create table FINAL_WEBLOG as
select SESSION_DT, C_IP, CS_USER_AGENT,
listagg(WEB_LINK, ' ')
within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
from WEBLOG_VIEWS
group by C_IP, CS_USER_AGENT, SESSION_DT
order by SESSION_DT
[code]....

the to_date function should be fine. In the data that I possess, the date and time are in no format. Example: 30118 and 0:00:09 respectively.

View 6 Replies View Related

SQL & PL/SQL :: Select Length - String Literal Too Long

Jun 21, 2011

If i try to find length of the string with more than 4000 char in SQL Developer it throws error "ORA-01704: string literal too long". if anything i need to SET in preference.

select length('string with more than 4000 char) from dual;

View 10 Replies View Related

PL/SQL :: ORA-01861 / Literal Does Not Match Format String

Sep 3, 2012

I've created a table, i have to insert data into it. Herwith Create table statement:

CREATE TABLE IOSTAT_MAC (
IS_DATE DATE,
IS_RS NUMBER(4,2),
IS_WS NUMBER(2,2),
IS_KRS NUMBER(5,2),
IS_KWS NUMBER(5,2),

[code]....

herewith data I have to insert

insert into iostat_mac values(to_date('2012/03/28 08:00:00 AM'),'653.6','20.7','15392.0','451.8','0.0','5.5','0.0','8.2','0','64','/vol/sun_dc_u2');

Receive ora-01861 error when trying to insert.Suspected it had to do with the date format, I changed the nls parameter for my session to include the time format, but to no avail.

View 4 Replies View Related

ORA-12713 - Character Data Loss In NCHAR / CHAR Conversion?

Apr 4, 2011

got this Errormessage "ORA-12713: Character data loss in NCHAR/CHAR conversion" during a rman backupjob! How can I fixed it?

View 3 Replies View Related

SQL & PL/SQL :: ORA-22835 Buffer Too Small For CLOB To CHAR Or BLOB To RAW Conversion?

Sep 24, 2008

Recently I came across this issue, which gives me an error as following.

ERROR:
ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 4907, maximum: 4000)

Now I am running a very simple query against one of the View in our Database.
Query is:

Select Prj_Num,
PM_Comments
From ProjectDetails
Where Rel = ‘2008 10’

What I have discovered so far is one of the field in this view name “PM_Comments” has more than 4000 bytes of information in it, Which is not supported by tools I have available on my computer. I have Oracle SQL Plus, SQL plus Worksheet, Access and Excel installed on my machine. DBA related to this database are stating that the field is working fine and query is executing without error since they are using TOAD for SQL, which does have capabilities to read more than 4000 bytes.

What I have figured out so far is “PM_Comments” is a LOB and SQL plus is having trouble reading this information more than 4000 bytes in one field of information.Because of this diagnosis, I have tried using following queries but it did not useful either.

Select Prj_Num,
Substr (PM_Comments, 1, 4000)
From ProjectDetails
Where Rel = ‘2008 10’

Select Prj_Num,
DBMS_LOB.Substr(PM_Comments, 4000, 1)
From ProjectDetails
Where Rel = ‘2008 10’

But both of the above mentioned queries did not work either. and I get the same ORA-22835 Error.I do not need all of the information in “PM_Comments” field, I only need about first 1000 characters of it.

View 10 Replies View Related

SQL & PL/SQL :: Insert Records Of One Table Into Another - Literal Does Not Match Format String

Sep 30, 2010

I'm trying to insert records of one table into another using the insert into table with select logic.

I'm trying to convert a two character value using CASE statement:

CASE REC_TYPE
WHEN '00' THEN to_number('0')
ELSE to_number('1')
END "REC_TYPE"

The target field is defined as number(1,0) and the source field is varchar2(2).

I keep getting an ORA-01861 literal does not match format string error.

View 10 Replies View Related

UPDATE Date / Literal Doesn't Match Format String

Nov 29, 2007

When I try to update a date column with this:

 UPDATE
        event_request
    SET
        REQ_EVENT_DATE = TO_CHAR(REQ_EVENT_DATE - INTERVAL '1' HOUR, 'yyyy-mm-dd hh24:mi')
    WHERE
        eventID=123 

Oracle returns this error:

 ERROR at line 4:ORA-01861: literal does not match format string 

where line 4 is REQ_EVENT_DATE = TO_CHAR(REQ_EVENT_DATE - INTERVAL '1' HOUR, 'yyyy-mm-dd hh24:mi').The REQ_EVENT_DATE field was originally populated with this stripped down query:

$date = '2007-12-25 08:35'; INSERT INTO (REQ_EVENT_DATE) VALUES (to_date('$date', 'yyyy-mm-dd hh24:mi'));

So - what is wrong with the UPDATE query?

View 1 Replies View Related

Precompilers, OCI & OCCI :: Connectivity Between C And Oracle?

Aug 12, 2008

Is it possible to connect with Oracle using C?

View 2 Replies View Related

Precompilers, OCI & OCCI :: Keep Getting ORA-22275 From Extproc?

Sep 26, 2012

I am trying to give back data from a stored procedure written in C. I registered the functions as follows:create or replace procedure version(versioninfo OUT clob) as external name "version" library myLib language c with context parameters (context, versioninfo, versioninfo INDICATOR SB4); It compiles fine. The function being called look like this:

extern "C" DLLEXPORT
void version(OCIExtProcContext* context, OCILobLocator **out, sb4 *ind_out){
OCIEnv* envh;
OCISvcCtx* svch;
OCIError* errh;
OCIExtProcGetEnv (context, &envh, &svch, &errh);

std::string versioninfo = "104";
oraub8 maxChar = 10;

[code]...

If I execute the procedure with SQLDeveloper by pressing "play" it is getting executed but there is no result. If I try to execute it from an anonymous block it results in ORA-22275 instead of doing anything.

declare
res clob;
begin
-- the following doesn't work much
--dbms_lob.createtemporary(res,true);
version(res);
dbms_output.put_line(res);
end;

Actually I have to questions:
1.) Why does Oracle give me the error? In my opinion all requirements mentioned by the error description are met.
2.) Why is there no output when executing the function via SQL Developer? Is the usage of OCILobWrite wrong?

View 2 Replies View Related

Precompilers, OCI & OCCI :: Describe STP In Package

Nov 26, 2009

I am trying to describe an STP in a package, but it gives me an error.

e.g. In package ABC suppose there is an STP XYZ, I am trying to describe ABC.XYZ function but it gives me an error code 4043 and error message object XYZ.ABC does not exist.

View 2 Replies View Related

Precompilers, OCI & OCCI :: 11g Pro*C Application Crashes While 10g Is OK

Jan 24, 2009

My 10g pro*c application works perfectly, recently I upgraded it to 11g, but it keep crashing, why?

View 10 Replies View Related

Precompilers, OCI & OCCI :: Proc Compilation?

Mar 31, 2010

i need to compile a proc program, say prog.pc.have oracle 10g in my system. Since i am new to proc programming, me on the steps to compile the proc program in oracle proc compiler.

View 2 Replies View Related

Precompilers, OCI & OCCI :: How To Get Columns As NUMBER(30)

Aug 13, 2008

in my oci applications,if i get a column of number that is in the scope of int,i can use value = *(int *)field.data; get the value,but if the column size is larger than 10,the code can't be available,how can i get the value.

View 6 Replies View Related

Precompilers, OCI & OCCI :: Calling Procedure From PRO C?

Nov 26, 2012

I am trying to call procedure from PRO C Procedure has many parameters and I do not need to put all of them when I call procedure. Is there way to make the same way as in PL/SQL

like this

my_procedure( q=>a1 , b=>'abc )

View 1 Replies View Related

Precompilers, OCI & OCCI :: How To Connect To Two Databases

Aug 25, 2009

My program needs to connect to two databases and make operations in both databases:

Quote:connect to db1;
connect to db2;

select from table in db1;
update table in db2;

i would like to know whether it's possible, and how to do it ? how to specify for each query the database connection to use?

note that I can't use dblinks as i don't have enough access rights and privileges on neither of the databases.

View 2 Replies View Related

Precompilers, OCI & OCCI :: How To Report Oracle Bug

Jan 30, 2009

How to report an Oracle bug? Is there webpage or email?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved