Most robust way to preserve data insert into CLOB?
Hello.
When inserting data into a CLOB column, some of the characters are not being preserved, such as ellipsis characters and other unusual characters. The data is being inserted via JDBC as a simple Java string sql statement in a Statement object. So, what is the most appropriate way to insert information into a CLOB such that all characters are preserved? (Do I have to use PreparedStatements or Clob.setString()?)
For example, the following sql insert:
"INSERT INTO t1 (myClob) VALUES ('Hello ... how are you?');"
Will end up inserting something like:
"Hello ? how are you?"
The ellipsis character (Unicode U+2026, I believe) is changed to something else. How can I preserve this and other characters? Thanks in advance.
Hi,
Must have something to do with NCHAR or Unicode characters.
Here are the notes i put in chapter 8 of my book, section 8.2.2
Notes:
Pre-10.2 JDBC does not support NCHAR literal (n'...') containing
Unicode characters that cannot be represented in the database character
set.
Using 10.2 JDBC against 10.2 RDBMS, NCHAR literals (n'...')
are converted to Unicode literals (u'...'); non-ASCII characters
are converted to their corresponding Unicode escape sequence.
Using 10.2 JDBC against pre-10.2 RDBMS, NCHAR literals (n'...') are
not converted and generate undetermined content for characters that
cannot be represented in the database character set.
Fwiw, here is my blog entry relative to Lobs (CLOB, BLOB, BFILE) :
http://db360.blogspot.com/2006/11/get-bolder-with-lobs-manipulation-in.html
Kuassi, http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html
Similar Messages
-
How is the data inserted into JTF_RS_SALESREPS?
Hi,
I wanted to know how is the data inserted into JTF_RS_SALESREPS.When we import the resources from CRM Foundation responsibilty the data will be inserted into jtf_rs_resource_extns.I think we need to run a concurrent program to transfer data from jtf_rs_resource_extns to JTF_RS_SALESREPS.
Which Concurrent program should be run?
Please help.
Thanks.How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
Thanks,
Hussein -
How is the data inserted into CST_INV_QTY_TEMP table?
Hi All,
How is the data inserted into CST_INV_QTY_TEMP table ?
Thanks in advance,
Mayur
Edited by: 928178 on 17-Apr-2012 04:29How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
Thanks,
Hussein -
Insert into CLOB fails with Oracle ODBC driver version 9.02.00.65
I tried to insert into CLOB using the latest Oracle ODBC driver 9.02.00.65 and it fails. But the same works with earlier versions of ODBC driver earlier to 9.02.00.65 ie., 9.02.00.63.
Here is the code snippet I tried. Any help now is highly appreciated as I am in the crunch time.
I tried the same code snippet with VARCHAR2 column with the same driver and it works.
** CONVDSN.C - This is the ODBC sample code for
** creating File DSN pointers to machine DSNs.
**This code is furnished on an as-is basis as part of the ODBC SDK and is
**intended for example purposes only.
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <sql.h>
#include <sqlext.h>
#include <odbcinst.h>
#include <sqltypes.h>
#define MAXDATALEN 25 //maximum data length per column
#define MAX_COL 15 //maximum column in result set
#define MAX_ROW 100 //maximum number of rows
#define MAXBUFLEN 256
#define SQLERR_FORMAT "SQL Error State:%s, Native Error Code: %lX, ODBC Error: %s"
#define MAXDISPLAYSIZE MAX_COL*(MAXDATALEN+1)
#define SQLWRNMSGTITLE "SQL_SUCCESS_WITH_INFO results"
#define SQLERRCNTDTITLE "SQL_ERROR results continued"
#define SQLWRNMSGTITLE "SQL_SUCCESS_WITH_INFO results"
#define SQLWRNCNTDTITLE "SQL_SUCCESS_WITH_INFO results continued"
#define NULLDATASTRING "SQL_NULL_DATA"
#define SQLERRMSGTITLE "SQL_ERROR results"
// prototypes
void ExpandFileName(LPSTR szFileDSNName, LPCSTR szDSNName);
void MakeLegalName(LPSTR szLegalDSNName, LPCSTR szDSNName);
// main routine: Iterate through the user and system DSNs, creating a pointer
// to each.
void FAR PASCAL DisplayError(SQLRETURN nResult, HWND hWnd, SWORD fHandleType, SQLHANDLE handle);
void insertSelectClob();
void checkRcCode(RETCODE rc);
int main (int argc, char* argv[])
insertSelectClob();
return 0;
void FAR PASCAL DisplayError(SQLRETURN nResult, HWND hWnd, SWORD fHandleType, SQLHANDLE handle)
UCHAR szErrState[SQL_SQLSTATE_SIZE+1]; // SQL Error State string
UCHAR szErrText[SQL_MAX_MESSAGE_LENGTH+1]; // SQL Error Text string
char szBuffer[SQL_SQLSTATE_SIZE+SQL_MAX_MESSAGE_LENGTH+MAXBUFLEN+1];
// formatted Error text Buffer
SWORD wErrMsgLen; // Error message length
UDWORD dwErrCode; // Native Error code
int iSize; // Display Error Text size
SQLRETURN nErrResult; // Return Code from SQLGetDiagRec
SWORD sMsgNum = 1;
SWORD fFirstRun = TRUE;
char szDispBuffer[MAXDISPLAYSIZE+1]; // Display Buffer
szBuffer[0] = '\0';
do
// continue to bring messageboxes till all errors are displayed.
// more than one message box may be reqd. as err text has fixed
// string size.
// initialize display buffer with the string in error text buffer
strcpy(szDispBuffer, szBuffer);
// call SQLGetDiagRec function with proper ODBC handles, repeatedly until
// function returns SQL_NO_DATA. Concatenate all error strings
// in the display buffer and display all results.
while ((nErrResult = SQLGetDiagRec(fHandleType, handle, sMsgNum++,
szErrState, &dwErrCode, szErrText,
SQL_MAX_MESSAGE_LENGTH-1, &wErrMsgLen)) != SQL_NO_DATA)
if(nErrResult == SQL_ERROR || nErrResult == SQL_INVALID_HANDLE)
break;
wsprintf(szBuffer, SQLERR_FORMAT, (LPSTR)szErrState, dwErrCode, (LPSTR)szErrText);
iSize = strlen(szDispBuffer);
if (iSize && (iSize+strlen(szBuffer)+1) >= MAXDISPLAYSIZE)
break;
if (iSize)
strcat(szDispBuffer, "\n");
strcat(szDispBuffer, szBuffer);
// display proper ERROR or WARNING message with proper title
if (nResult == SQL_SUCCESS_WITH_INFO)
MessageBox(hWnd, szDispBuffer, (fFirstRun? SQLWRNMSGTITLE : SQLWRNCNTDTITLE),
MB_OK | MB_ICONINFORMATION);
else
MessageBox(hWnd, szDispBuffer, (fFirstRun? SQLERRMSGTITLE : SQLERRCNTDTITLE),
MB_OK | MB_ICONEXCLAMATION);
if (fFirstRun)
fFirstRun = FALSE;
while (!(nErrResult == SQL_NO_DATA || nErrResult == SQL_ERROR || nErrResult == SQL_INVALID_HANDLE));
void insertSelectClob()
SQLCHAR clobdata[1001];
SQLCHAR resultdata[1001];
SQLINTEGER ind = SQL_DATA_AT_EXEC;
SQLCHAR *bufp;
SQLINTEGER cbOrderID = sizeof(SQLSMALLINT);
SQLSMALLINT sTmp=13;
SQLCHAR *sqlStmt1 = _T("INSERT INTO clobtbl(id, clob1) VALUES(?, ?)");
SQLCHAR *sqlStmt2 = _T("SELECT id, clob1 FROM clobtbl");
// SQLCHAR *sqlStmt1 = _T("INSERT INTO testInsert(id, clob1) VALUES(?, ?)");
// SQLCHAR *sqlStmt2 = _T("SELECT id, clob1 FROM testInsert");
int clobdatalen, chunksize, dtsize, retchklen;
HENV envHnd;
HDBC conHnd;
HSTMT stmtHnd;
RETCODE rc;
int nRowcnt=0;
SQLPOINTER pToken = NULL;
rc = SQL_SUCCESS;
// ENV is allocated
rc = SQLAllocEnv(&envHnd);
// Connection Handle is allocated
rc = SQLAllocConnect(envHnd, &conHnd);
rc = SQLConnect(conHnd, T("testd734"), SQLNTS, T("ipathdba"), SQLNTS, T("ipathdba"), SQLNTS);
printf(_T("Insert CLOB1 using SQLPutData...\n[%s]\n"), sqlStmt1);
// Set CLOB Data
int i;
SQLCHAR ch;
for (i=0, ch=_T('A'); i< sizeof(clobdata)/sizeof(SQLCHAR); ++i, ++ch)
if (ch > _T('Z'))
ch = _T('A');
clobdata[i] = ch;
clobdata[sizeof(clobdata)/sizeof(SQLCHAR)-1] = _T('\0');
clobdatalen = lstrlen(clobdata); // length of characters
chunksize = clobdatalen / 7; // 7 times to put
rc = SQLAllocHandle(SQL_HANDLE_STMT, conHnd, &stmtHnd);
// Step 1: Prepare
rc = SQLPrepare(stmtHnd, sqlStmt1, SQL_NTS);
// checkSQLErr(envHnd, conHnd, stmtHnd, rc);
// Step 2: Bind Parameter with SQL_DATA_AT_EXEC
rc = SQLBindParameter(stmtHnd,
1,
SQL_PARAM_INPUT,
SQL_C_SSHORT,
SQL_INTEGER,
0,
0,
&sTmp,
0,
&cbOrderID);
rc = SQLBindParameter(stmtHnd,
2,
SQL_PARAM_INPUT,
SQL_C_CHAR,
SQL_LONGVARCHAR,
clobdatalen*sizeof(CHAR),
0,
(SQLPOINTER)clobdata,
clobdatalen*sizeof(CHAR),
&ind);
// checkSQLErr(envHnd, conHnd, stmtHnd, rc);
// Step 3: Execute
rc = SQLExecute(stmtHnd);
while (rc == SQL_NEED_DATA) {
rc = SQLParamData(stmtHnd, &pToken);
if (rc == SQL_NEED_DATA) {
for (dtsize=0, bufp = clobdata;
dtsize < clobdatalen;
dtsize += chunksize, bufp += chunksize)
int len;
if (dtsize+chunksize < clobdatalen)
len = chunksize;
rc = SQLPutData(stmtHnd, bufp, len*sizeof(SQLCHAR));
else
len = clobdatalen-dtsize;
rc = SQLPutData(stmtHnd, bufp, SQL_NTS);
rc = SQLParamData(stmtHnd, &pToken);
// Fails as row count retrieved is zero.
rc = SQLRowCount(stmtHnd, &nRowcnt);
if(rc != SQL_SUCCESS)
DisplayError(rc, NULL, SQL_HANDLE_ENV, conHnd);
rc = SQLFreeStmt(stmtHnd, SQL_CLOSE);
printf(_T("Finished Update\n\n"));
rc = SQLAllocStmt(conHnd, &stmtHnd);
if (rc != SQL_SUCCESS)
printf(_T("Failed to allocate STMT\n"));
exit(-1);
// Clear Result Data
memset(resultdata, 0, sizeof(resultdata));
chunksize = clobdatalen / 15; // 15 times to gut
rc = SQLExecDirect(stmtHnd, sqlStmt2, SQL_NTS); // select
if(rc != SQL_SUCCESS)
DisplayError(rc, NULL, SQL_HANDLE_ENV, conHnd);
// Step 2: Fetch
rc = SQLFetch(stmtHnd);
for(dtsize=0, bufp = resultdata;
dtsize > sizeof(resultdata)/sizeof(CHAR) && rc != SQL_NO_DATA;
dtsize += chunksize-1, bufp += chunksize-1)
int len; // len should contain the space for NULL termination
if (dtsize+chunksize<sizeof(resultdata)/sizeof(CHAR))
len = chunksize;
else
len = sizeof(resultdata)/sizeof(CHAR)-dtsize;
// Step 3: GetData
rc = SQLGetData(stmtHnd,
2,
SQL_C_CHAR,
(SQLPOINTER)bufp,
len*sizeof(CHAR),
&retchklen);
if (!_tcscmp(resultdata, clobdata))
printf(_T("Succeeded!!\n\n"));
else
printf(_T("Failed!!\n\n"));
if (conHnd)
SQLFreeConnect(conHnd);
if (envHnd)
SQLFreeEnv(envHnd);
}Hi,
Since 9.2 has been desupported for error correction you will not be able to download that version from OTN. You should ask whoever is providing the training if their is an alternate version you can use. The only versions that you will be able to download from oracle.com is 10.2 11.1, and 11.2. -
I have xml data in this format and need to store in the lineitem table by generating three new values for each row ie line identifier(sys_guid),begin_date and end_date.
<LineItems>
<LineItem>
<BASE_TYPE>SRV</BASE_TYPE>
<ORDER_NUM>124089304</ORDER_NUM>
<WIP_STATUS>S</WIP_STATUS>
<WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
<order_date>6/21/2006 12:00:00 AM</order_date>
<IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
</LineItem>
<LineItem>
<BASE_TYPE>SRV</BASE_TYPE>
<ORDER_NUM>124089304</ORDER_NUM>
<WIP_STATUS>S</WIP_STATUS>
<WIP_STATUS_DATE>8/1/2006 8:44:55 PM</WIP_STATUS_DATE>
<order_date>6/21/2006 12:00:00 AM</order_date>
<IP_DATE>6/21/2006 12:00:00 AM</IP_DATE>
</LineItem>
</LineItems>
and using this method to insert
SELECT EXTRACTVALUE(VALUE(T), 'LineItem/BASE_TYPE'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS'),
EXTRACTVALUE(VALUE(T), 'LineItem/WIP_STATUS_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/IP_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_BY_DATE')),
EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_SRC'),
EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_LOC'),
EXTRACTVALUE(VALUE(T), 'LineItem/CUSTOMER_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/ACCOUNT_TYPE'),
EXTRACTVALUE(VALUE(T), 'LineItem/OVERPACK_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/INTERNATIONAL_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/MULTIPLE_SYSTEM_TIES'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TIE_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/TIE_STATUS'),
EXTRACTVALUE(VALUE(T), 'LineItem/PK_GEN'),
EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQD'),
EXTRACTVALUE(VALUE(T), 'LineItem/WORKCENTER_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/SI_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/MFG_SCHED_FACILITY_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/MFG_FACILITY_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/PILOT_NAME'),
EXTRACTVALUE(VALUE(T), 'LineItem/ENG_HOLD_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/SHORT_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/OVR_SHORTAGE'),
EXTRACTVALUE(VALUE(T), 'LineItem/USER_HOLD_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/SHIP_TO_ADDRESS_SEQ_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/CALICO_REF_NUM'),
EXTRACTVALUE(VALUE(T), 'LineItem/CONFIG_ID'),
EXTRACTVALUE(VALUE(T), 'LineItem/TOTAL_UNITS_QTY'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORDER_TYPE'),
EXTRACTVALUE(VALUE(T), 'LineItem/SKU'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUB_ASSEMBLY_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/BASE_ASM_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/QTY_REQ'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIGINAL_PART_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBSTITUTE_PART_NUMBER'),
EXTRACTVALUE(VALUE(T), 'LineItem/QTY_EXTENDED'),
EXTRACTVALUE(VALUE(T), 'LineItem/ISSUE_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PART_DESC'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_COMMODITY_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_PRINT_ON_TRAVELER_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/ORIG_BOX_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PART_DESC'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_COMMODITY_CODE'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_PRINT_ON_TRAVELER_FLAG'),
EXTRACTVALUE(VALUE(T), 'LineItem/SUBST_BOX_CODE')
BULK COLLECT INTO
V_BASE_TYPE,
V_ORDER_NUM,
V_WIP_STATUS,
V_WIP_STATUS_DATE,
V_ORDER_DATE,
V_IP_DATE,
V_SHIP_BY_DATE,
V_CUSTOMER_SRC,
V_CUSTOMER_LOC,
V_CUSTOMER_NUM,
V_ACCOUNT_TYPE,
V_OVERPACK_FLAG,
V_INTERNATIONAL_FLAG,
V_MULTIPLE_SYSTEM_TIES,
V_ORDER_TIE_NUM,
V_TIE_STATUS,
V_PK_GEN,
V_QTY_REQD,
V_WORKCENTER_ID,
V_SI_NUMBER,
V_MFG_SCHED_FACILITY_ID,
V_MFG_FACILITY_ID,
V_PILOT_NAME,
V_ENG_HOLD_FLAG,
V_SHORT_FLAG,
V_OVR_SHORTAGE,
V_USER_HOLD_FLAG,
V_SHIP_TO_ADDRESS_SEQ_NUM,
V_CALICO_REF_NUM,
V_CONFIG_ID,
V_TOTAL_UNITS_QTY,
V_ORDER_TYPE,
V_SKU#,
V_SUB_ASSEMBLY_NUMBER,
V_BASE_ASM_FLAG,
V_QTY_REQ,
V_ORIGINAL_PART_NUMBER,
V_SUBSTITUTE_PART_NUMBER,
V_QTY_EXTENDED,
V_ISSUE_CODE,
V_ORIG_PART_DESC,
V_ORIG_COMMODITY_CODE,
V_ORIG_PRINT_ON_TRAVELER_FLAG,
V_ORIG_BOX_CODE,
V_SUBST_PART_DESC,
V_SUBST_COMMODITY_CODE,
V_SUBST_PRINT_ON_TRAVELER_FLAG,
V_SUBST_BOX_CODE
FROM TABLE(XMLSEQUENCE(EXTRACT(P_PODETAILS_XML, '/LineItems/LineItem'))) T
but getting performace problem. I'm able to insert 100 lines items in 3 sec but requirement is further less.
Any help..... ????
thanks in adavance..hi..
me too having same type of XML data to be inserted into oracle table
i've to write procedure for this
can u help me plz..... -
Hi all,
I have some xml data which i would like to insert into oracle tables.
Where to start up with this?Hi,
Here's another good place to start: [XML DB FAQ|http://forums.oracle.com/forums/thread.jspa?threadID=410714&tstart=0]
You seem to be especially interested in second post in there.
Regards
Peter -
Strange data inserted into table via table trigger
Hi ,
There is some strange phenomenon happen occasionally where some tables update records will have a TRIGGER to insert records into a table and once in a while, the record has some strange data inserted which looks like a memory corruption. It is running on 10.2.0.3.
Does anyone ever encounter this before?
Strange result:
PRIM_KEY
-3.614364951000000000000000000000000E-47
-3.614364951000000000000000000000000E-47
Normal result:
PRIM_KEY
1137KT
1137KT
anaHi,
What is strange in this? Its not memory corruption. Its just one of the numeric form of representation of number
-3.614364951000000000000000000000000E-47it means -3.614364951 * 10 to the power of -47.
Whatever value has been entered into the table depends on your business logic you coded, and user input.
Regards -
XML Data Inserts into Tables???
hi there,
will i be able to an insertXML call onto a table wherein i need to just insert a few node values into couple of fields in the table and leave the other fields unpopulated? - aka - i need to grab the node values from the XML file and then store it to respective fields in the table with the insertXML call - something like::
OracleXMLSave.insertXML(value-of(node1), value-of(node2)) table1.field1, table1.field2;
is something like the above statement possible?
Thanks..
nullIf your XML Document looks like:
<ROWSET>
<ROW>
<FIELD1>val-1</FIELD1>
<FIELD12>val-12</FIELD12>
</ROW>
</ROWSET>
it will insert into just those two
fields, the rest will be null for
the purposes of the insert. -
XML data inserting into Master, not Page
First, I fully admit that I jumped into the deep end of the pool. This is my first InDesign project and I'm trying to set up a 2-page spread master to support loading my content from XML.
Thanks to the great online help, these forums/community resources, and my growing bookshelf, I've successfully (or so it seems) created my Master layout, with frames appropriately tagged for my XML (as confirmed by the Structure). Since I'm very novice at InDesign, my testing isn't always unambiguous, but I HAVE successfully loaded my external XML (including graphics and anchored text, plus the story) into my document.
The problem is that the data seems to be flowing into the Master, and not the Page. So if I create all the pages I need ahead of time (right now just 2 spreads for my test), both pages are populated with the first record.
If I only create the first spread, then the data flows and I get the magic "+" for overflow, but I can't click on it in the Page. If I change to the Master I can click on it, which seems the major clue as to why this isn't working. I just have no idea how to fix it.
From everything I've read it seems that I should be able to tag my frames in the Master (which I want to reuse for other documents) and have the data flow into the Pages.
Am I missing something obvious?
Or is what I'm trying to do just not possible? (if so, does that mean I have to keep re-tagging the frames every time I make a new Document? ugh)
I've spent hours trying to resolve this, and would really appreciate a pointer to get me moving again.
Thanks!
julieHm, that seems contradictory to everything I've read and the examples I've seen (although I may have misunderstood the examples - none are quite as complicated as my layout). My text frame has several anchors for XML data that doesn't just flow with the story. How do I set up the tagged anchor frames I need if the story text frame is in the Master but not tagged?
I thought that the story text frame and the anchor frames (some graphics and some text) all needed to be in the same context. If I put them in the Master I get the XML flowing into the Master. If I put them into the Page then the new pages created don't have the proper frames. If I just put the story text frame in the Master, how do I associate it with the anchor frames (I only know how to do this by using the Story editor on the tagged frame as described in A Designer's Guide To Adobe InDesign and XML)?
I'll go back and work through the samples again, but I definitely don't understand how it all fits together.
Thanks!
j -
Most efficient way to query dates
Hi!
Just wondering if anyone know the quickest or best way to to date comparisons with Oracle. Ie does it take longer for oracle to convert the input date from the inputted date to a date it can use to compare. eg
iuser.CreateDate <= to_date('07:Dec:2004:11:59:59:PM', 'DD:MON:YYYY:HH:MI:SS:AM')
OR
iuser.CreateDate <= to_date('07:12:2004:11:59:59:PM', 'DD:MM:YYYY:HH:MI:SS:AM')Hello,
I have two comments:
a) what about to use only "<" operator with next day instead of "<="
iuser.CreateDate <= to_date('07:Dec:2004:11:59:59:PM', 'DD:MON:YYYY:HH:MI:SS:AM')
iuser.CreateDate < ('08:Dec:2004', 'DD:MON:YYYY')
b) I think that more faster could be passing the comparision date as date parameter iuser.CreateDate < :inp_test_date.
sasa -
Most efficient way to import data from Excel to InDesign?
Hi all,
I'm designing a college prospectus which includes 400+ course listings. At the moment, these listings exist as a vast Excel sheet with fields like course type, course code, description etc.
I'm familiar with importing Excel data into InDesign and formatting tables/creating table styles and such, but the problem I'm having is that the data is in multiple columns per course in the Excel sheet, but will be arranged in one column per course with multiple rows in the InDesign document. I can't seem to find a way to easily convert these columns into rows.
Can anyone help me with an efficient way to get the data into the layout without laborious copying and pasting or formatting?
Many thanks in advance!Hi,
Dans excel coller/ transpose -
Difference in data inserting into the tales
Hi,
I have written a Procedure which will insert the same number of data into two different tables. before executing the procedure, two tables are having same data. After executing the procedure it should insert the same number of records into those two tables. But the count after executing the procedure is coming differently? so I cross checked with the procedure and it was executing successfully without any failures. But data is not getting inserted properly. Please let me know how can I find the root cause of this error.
please guide me.
Thanks.905508 wrote:
Hi,
I have written a Procedure which will insert the same number of data into two different tables. before executing the procedure, two tables are having same data. After executing the procedure it should insert the same number of records into those two tables. But the count after executing the procedure is coming differently? so I cross checked with the procedure and it was executing successfully without any failures. But data is not getting inserted properly. Please let me know how can I find the root cause of this error.
please guide me.
Thanks.You have a mystery & we have no clues.
It is impossible to debug code that can not be seen, using unknown data against unknown tables.
it was executing successfully without any failures.
But data is not getting inserted properly. which of the statements above is incorrect since they are contradictory! -
Hi all,
I am trying to use UTL_FILE.PUT_LINE to output an XML file. This xml file is the result of a select query. Hence converting the result of the select query into xml format using dbms_xmlgen.getxml and storing it in a variable. But the resultant xml data > 32k . What would be the best way to store it in variable? When using CLOB datatype, getting a numeric value error.
Thanks in advance.As you didn't post the code, nor included a four digit database version, you are asking someone to look in a crystal ball.
Sorry, they are out for repair.
Also the XDB forum would be more appropriate.
Sybrand Bakker
Senior Oracle DBA -
Inser Data in to CLOB using BC4J
Hi
I am going thru the docs by oracle for data insertion into CLOB.
in the method getCLOB(String data,Connection conn) how do we get the Connection object when we are using BC4J.
Any help ..
ThanksThis does not work when the Atribute is set to mandatory in the Entity Object.
It works fine when it is not mandatory. This is a bug . -
Issue - data is not inserting into queue table
Hi friends....i created a queue table & queue , started queue. while inserting number into queue, it is going fine. but , while browsing queue table, there is no data inserted into table. table is empty. i executed same script in another machine, it is working fine there.but, it is not working in my machine. i don't know why?.
can anybody please help me to find out what will be the issue.
these are the scripts i created........
BEGIN
DBMS_AQADM.CREATE_QUEUE_TABLE (
queue_table => 'put_queue_table',
queue_payload_type => 'sys.aq$_jms_text_message'
END;
anonymous block completed
BEGIN
DBMS_AQADM.CREATE_QUEUE (
queue_name => 'QUALTY_QUEUE',
queue_table => 'put_queue_table'
DBMS_AQADM.START_QUEUE (
queue_name => 'QUALTY_QUEUE'
END;
anonymous block completed
DECLARE
v_payload SYS.AQ$_JMS_TEXT_MESSAGE;
v_enqueue_options dbms_aq.enqueue_options_t;
v_message_properties dbms_aq.message_properties_t;
v_message_handle RAW(16);
v_text VARCHAR2(37);
BEGIN
v_text := to_char('157');
v_payload := SYS.AQ$_JMS_TEXT_MESSAGE.construct;
v_payload.set_text(v_text);
DBMS_AQ.ENQUEUE(
queue_name => 'QUALTY_QUEUE',
enqueue_options => v_enqueue_options,
message_properties => v_message_properties,
payload => v_payload,
msgid => v_message_handle
COMMIT;
END;
anonymous block completedPlease define what you mean by "when browsing [the] queue table" and why you think what you are doing should be inserting new rows in the table. Also please post full version information.
Maybe you are looking for
-
I updated the software on my ipad2 at work and now it won't connect via wifi
The 3G works fine and the device connects to the router ok but there is no Internet access
-
I can't connect to the new downloaded version of Skype, as my old one is in the way, and I can't get rid of it. what do I do?
-
I notice that when youare viewing your thumbnails on the iPod there is the month and year at the top of the screen. Is there a way to put them in the right place? ie. Jan 2004, feb 2004, mar 2004 and so on. Right now the month and years are all over
-
Error 1901. Error attempting to read from the source installation database
OS: Windows 7 Enterprise 64-bit Browsers: IE 9 and Firefox 10 Flash Version 11.7.700.169 I'm logged in as Administrator. I'm trying to install using this: start "" /wait msiexec /i install_flash_player_11_active_x.msi /qb and start "" /wait msiexec
-
I have an J2EE application along. This application works fine in IDE(JDeveloper9i), but when I want to deploy the EARfile in Jdeveloper10g,it gives me nested Exception in the code according to the following message in the console: Wrote WAR file to C