ORA-1461 with multiple NVARCHAR2 columns
Hi,
I use version 10.2.0.1 version of ojdbc with an Oracle9i database and get ORA-1461 (can bind a LONG value only for insert into a LONG column) when updating multiple NVARCHAR2 columns in the same table.
What is strange is:
if I set column1=value1 and column2 null it works
if I set column2=value2 and column1 null it works
But if i set column1=value1 AND column2=value2 I have this exception.
I assume that because using UTF8 I can have an exception for one column if less than 4000 because of nb bytes used by one character but can't understand why different columns sizes interact...
Database parameters :
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET UTF8
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE (don't know if usefull)
Can anyone tell me out to make it work ?
I tried with driver 10.2.0.3 and have the same issue.
Thanks for your help.
Message was edited by:
user610168
Hi,
I use version 10.2.0.1 version of ojdbc with an Oracle9i database and get ORA-1461 (can bind a LONG value only for insert into a LONG column) when updating multiple NVARCHAR2 columns in the same table.
What is strange is:
if I set column1=value1 and column2 null it works
if I set column2=value2 and column1 null it works
But if i set column1=value1 AND column2=value2 I have this exception.
I assume that because using UTF8 I can have an exception for one column if less than 4000 because of nb bytes used by one character but can't understand why different columns sizes interact...
Database parameters :
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET UTF8
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE (don't know if usefull)
Can anyone tell me out to make it work ?
I tried with driver 10.2.0.3 and have the same issue.
Thanks for your help.
Message was edited by:
user610168
Similar Messages
-
Cross tab with multiple repeating columns
Hi All,
I'm developing a cross tab report.. my sample xml file is
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Back Office</DD_CODE>
<NOTE_DATE>12</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Back Office</DD_CODE>
<NOTE_DATE>11</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Back Office</DD_CODE>
<NOTE_DATE>14</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Back Office</DD_CODE>
<NOTE_DATE>112</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Monitoring</DD_CODE>
<NOTE_DATE>121</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Monitoring</DD_CODE>
<NOTE_DATE>122</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Monitoring</DD_CODE>
<NOTE_DATE>131</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Call - Monitoring</DD_CODE>
<NOTE_DATE>111</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Back Office</DD_CODE>
<NOTE_DATE>11</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Back Office</DD_CODE>
<NOTE_DATE>143</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Back Office</DD_CODE>
<NOTE_DATE>122</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Back Office</DD_CODE>
<NOTE_DATE>111</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Monitoring</DD_CODE>
<NOTE_DATE>1432</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Monitoring</DD_CODE>
<NOTE_DATE>112</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Monitoring</DD_CODE>
<NOTE_DATE>121</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Site Visit - Monitoring</DD_CODE>
<NOTE_DATE>123</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Visit - WDE Office</DD_CODE>
<NOTE_DATE>123</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Visit - WDE Office</DD_CODE>
<NOTE_DATE>1321</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Visit - WDE Office</DD_CODE>
<NOTE_DATE>1312</NOTE_DATE>
</ROW>
<ROW>
<NAME>Product</NAME>
<DATE>2008-05-01T00:00:00.000-05:00</DATE>
<TYPE_CODE></TYPE_CODE>
<MOST_RECENT_NOTE_DATE>1</MOST_RECENT_NOTE_DATE>
<DD_CODE>Visit - WDE Office</DD_CODE>
<NOTE_DATE>211</NOTE_DATE>
</ROW>
</ROWSET>
If I use the cross tab wizard ...I'm get the following output..
-------------Call - Back Office-------Call - Monitoring-------Site Visit - Back Office-------Site Visit -Monitoring-----Visit - WDE Office
product 12 121 11 1432 123
but I'm looking for output like...
-------------Call - Back Office-----Call - Monitoring------Site Visit - Back Office------Site Visit -Monitoring-------Visit - WDE Office
product-------12 11 14 112-----------121 122 131 111----------11 143 122 111------------------1432 112 121 123 ---------123 1321 1312 211The numbers under each column are dynamic ..I might be getting 2,3,4..(In this case all are four)...I looked at the below link but it had static 2 repeating columns..but in my case the repeating columns are unknown...
http://winrichman.blogspot.com/2008/09/crosstab-with-multiple-repeating.html
Is is possible to build a cross tab like that..?
Thanks in Advance..Hi..
Thanks alot for your time..
can I e-mail you my actual xml file..? becuase if there are multiple rows(multiple <?NAME?>)...the column headers(DD_CODE) are repeating for every row(<?NAME?>)..also is it possible to get each NOTE_DATE in a cell(here all the NOTE_DATE are displaying in a table)....
present output...
-------------Call - Back Office-----Call - Monitoring------Site Visit - Back Office------Site Visit -Monitoring-------Visit - WDE Office
product-------12 11 14 112-----------121 122 131 111----------11 143 122 111------------------1432 112 121 123 ---------123 1321 1312 211
-------------Call - Back Office-----Call - Monitoring------Site Visit - Back Office------Site Visit -Monitoring-------Visit - WDE Office
product1-------11 15 13 12-----------00 111 132 444----------12 434 123 171------------------1832 162 221 124 ---------143 1231 1311 241
looking for output like..
-------------Call - Back Office-----Call - Monitoring------Site Visit - Back Office------Site Visit -Monitoring-------Visit - WDE Office
product-------12 11 14 112-----------121 122 131 111----------11 143 122 111------------------1432 112 121 123 ---------123 1321 1312 211
product1-------11 15 13 12-----------00 111 132 444----------12 434 123 171------------------1832 162 221 124 ---------143 1231 1311 241Thanks in Advance... -
A simple question about wrong sorting with multiple sort columns in Excel 2010
Hi, everyone! I have encountered a problem that I don't know how to explain.
So I post it here because I don't know if there is another more relevant forum...
I have a data sheet with the students' scores for the course.
All the data were generated with the randbetween function,
and pasted with the values.
To rank the students by their performance,
I did the sort with the column "total score" as the first sort-column
and "final term" as the second.
The weird thing to me is that the order of the data seems problematic.
That is, all the rows are sorted correctly with the first sort-column.
But for the rows with the same values of the first sort-column,
there are some rows whose values of the second sort-column are out of order.
(please look at the data file at
www_dot_kuaipan_dot_cn/file/id_67204268108546068_dot_htm
Please change the "_dot_" to the real literal dot.
Especially the rows with 56.7 as the first sort-column value
and some other values near the tail of the list.)
I tried to manually input and sort the same values of both columns
in a near-by region. The result was correct.
When some friend copied all the data to paste in Notepad,
and reload them in excel. The problem disappears.
Some friend also tried to wrap a round function at the values of the 1st sort-column,
the sorting order became correct!
But they could not explain why either.
How confusing! I even tried to swap the first and secod sort-column;
the output was right.
All the data were generated by randbetween function and pasted with values.
Where could all the special characters, if any, come?
Can anyone give me an explanation? I would be very grateful.
Thanks in advance!Re: Sort is not in proper order
Sounds as if the data includes spaces or hidden characters that are affecting the sort.
That is indicated by the fact that manually entering the data resolves the problem.
Note: You can use a public file storage website to hold your file and add the link to it in your post.
Jim Cone
Portland, Oregon USA
Special Sort excel add-in (30+ ways to sort) - 3 week no obligation trial
https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2 -
Multi-Select LOV with multiple return columns
Hi,
I'm wondering if it's possible (and how) to return more columns from the LOV page the calling page. Default only 1 column is displayed in the LOV and 1 column is returned.
However it's easy to display an additional column in the LOV: Just copy the column tag change the binding column to display and change the prompt.
Furthermore in my situation I don't have a FK between the calling page and LOV. It's just a LOV which returns values which can be edited after.
Regards,
MarcelMarcel,
In the upcoming release it will be possible to supply a comma-separated list in the 'Lookup Display Attributes' field, so that multiple fields are shown in the LOV.
When you use UIX and have an Entity Association to the Entity Object in the LOV, passing back multiple fields is already possible. But in your case, you will probably have to use your own javascript to implement this functionality.
Kind regards,
Peter Ebell
JHeadstart Team -
Report with multiple COUNT columns with counts from same table
I am new to discoverer so I am a bit lost.
I am working to create a report to show usage data from the eBusiness Knowledge Base. I have the query written in SQL using subqueries that is in the format:
Solution Number | Soultion Title | Solution Views | Positive Feedback | Negative Feedback
12345 ___________ Title ________ 345 ____________ 98 _______________ 34
The 'Views', 'Positive' and 'Negative' entries are stored in the same table so i am doing a count where setid=setid and usedtype=VS, then counting where usedtype=PF and usedtype=NF
In discoverer I can get the solution number, title and ONE of the totals but I can't seem to figure out how to get a COUNT for three different things from the same table in columns on the same row.
When I go to edit sheet -> select items once I select the COUNT option for the UsedType column in the table CS_KB_SET_USED_HISTS I can't select it again. I also have found now way to add a column based on an entered query.
If anyone could help it would be much appreciated.
Thanks
Edited by: Toolman21 on Dec 2, 2010 2:17 PM
added ______ to correct spacing.Hi,
You can separate the column by using a case or decode.
for example create 2 calculations:
case
when usedtype='PF'
then <you original column> --- the one contain them both
else 0
end
case
when usedtype='NF'
then <you original column> --- the one contain them both
else 0
end
after that you can create the count aggregation over those.
Tamir -
Insert into NVARCHAR2 columns(ORA_01461, ORA-01026)
Hi,
Oracle8i Client 8.1.5 (OCI8)
Oracle9i Client 9.0.1 (OCI9)
Oracle8i/9i DB
I want to insert strings into a table with two NVARCHAR2 columns with OCI.
NLS_NCHAR_CHARACTERSET is UTF8 (DB). The provided String is encoded in Windows-1252.
The supplied buffers in the OCIBindByPos have a size of 200bytes each.
->With OCI8 I'm getting the message:
"ORA-01026 multiple buffers of size > 4000 in the bind list"
If only one NVARCHAR2 column is involved (or if I use normal
VARCHAR2 instead) it works fine.
->With OCI9 I get the message:
"ORA-01461 can bind a LONG value only for insert into a LONG column"
But only, if I set the OCI_ATTR_MAXDATA_SIZE attribute.
If I do not set the OCI_ATTR_MAXDATA_SIZE attribute, it works, but if
I supply a buffer bigger than 1333 bytes in the OCIBindByPos for the second
NVARCHAR2 column, then ORA_01461 happens. The buffer for the first NVARCHAR2
column can be set to a higher values
->The same behaviour occurs with NCHAR, NCLOB (->national character types)
These are the main steps:
OCIBindByPos((OCIStmt *) pStmtInsert, (OCIBind **) &pBind,
(OCIError *) pError, (ub4) i, (dvoid *)pData,
(sb4) bufferSize, //200bytes
(ub2) dataTypeSQLT, //SQLT_STR
(dvoid *) pIndicator, (ub2 *) 0, (ub2 *) 0, (ub4) 0,
(ub4 *) 0, (ub4) OCI_DEFAULT);
OCIAttrSet((dvoid *) pBind, OCI_HTYPE_BIND,
&Frm, //SQLCS_NCHAR
0, OCI_ATTR_CHARSET_FORM, (OCIError *) pError);
OCIAttrSet((dvoid *) pBind, OCI_HTYPE_BIND,
(dvoid *) &charSet, //WE8MSWIN1252
0, OCI_ATTR_CHARSET_ID, (OCIError *) pError);
OCIAttrSet((dvoid *) pBind, OCI_HTYPE_BIND,
(dvoid *) &maxDataSize, //->size of the column in bytes
0, OCI_ATTR_MAXDATA_SIZE, (OCIError *) pError);
OCIStmtExecute((OCISvcCtx *) pServiceContext, (OCIStmt *) pStmtInsert,(OCIError *) pError,
(ub4) 1, (ub4) 0, (OCISnapshot *) 0, (OCISnapshot *) 0,
OCI_COMMIT_ON_SUCCESS);
Any ideas?
Thanks,
AxelI found this link referring to a similar problem that was apparently fixed in version 10.2.0.4 of the server: ORA-01461: can bind a LONG value only for insert into a LONG column Should I try to upgrade the server and see if that fixes things?
-
PIVOT with multiple columns to add and multiple levels of grouping
Hi friends,
I got a table with the columns in the form of:
CRITERIA_A,
CRITERIA_B,
CRITERIA_C,
AMOUNT_A,
AMOUNT_B,
AMOUNT_C,
AMOUNT_D
Any way to design a pivot to present the table reflecting:
Sums of Amount_A, Amount_B, Amount_C, Amount_D
For Rows reflecting grouping levels on:
Criteria_B, Criteria_C
and Columns breakup for:
Criteria_A?
An example like:
Criteria_A1
Criteria_A2
Criteria_A3
Criteria_A4
Row Labels
Sum of Amount_A
Sum of Amount_B
Sum of Amount_C
Sum of Amount_D
Sum of Amount_A
Sum of Amount_B
Sum of Amount_C
Sum of Amount_D
Sum of Amount_A
Sum of Amount_B
Sum of Amount_C
Sum of Amount_D
Sum of Amount_A
Criteria_B3
94
107
36
127
84
132
41
176
24
16
67
29
38
Criteria_C1
24
25
5
49
14
66
5
49
24
16
67
29
Criteria_C2
70
82
31
78
38
Criteria_C3
38
41
31
78
Criteria_C4
32
25
5
49
Criteria_B1
56
142
78
26
32
25
67
8
24
Criteria_C2
24
66
26
8
32
25
67
8
Criteria_C3
32
76
52
18
Criteria_C4
24
Criteria_B2
162
309
264
81
132
230
155
124
14
25
52
8
38
Criteria_C1
38
76
26
8
62
98
98
66
14
25
52
8
38
Criteria_C2
86
157
186
44
70
132
57
58
Criteria_C3
38
76
52
29
Criteria_B4
100
148
130
116
56
142
93
57
46
Criteria_C1
24
66
67
49
32
Criteria_C2
32
76
26
8
14
Criteria_C3
76
82
78
67
Criteria_C4
24
66
52
49
Grand Total
312
558
378
234
348
535
393
424
94
183
212
94
146
Thanx in advance, Best Regards, Faraz A QureshiSounds like this to me if in T-SQL query
(best guess based on what you posted)
SELECT
CRITERIA_B,
CRITERIA_C,
SUM(CASE WHEN CRITERIA_A = 'Critera_A1' THEN AMOUNT_A ELSE 0 END) AS CRITERIA_A1_AMOUNT_A,
SUM(CASE WHEN CRITERIA_A = 'Critera_A1' THEN AMOUNT_B ELSE 0 END) AS CRITERIA_A1_AMOUNT_B,
SUM(CASE WHEN CRITERIA_A = 'Critera_A1' THEN AMOUNT_C ELSE 0 END) AS CRITERIA_A1_AMOUNT_C,
SUM(CASE WHEN CRITERIA_A = 'Critera_A2' THEN AMOUNT_A ELSE 0 END) AS CRITERIA_A2_AMOUNT_A,
SUM(CASE WHEN CRITERIA_A = 'Critera_A2' THEN AMOUNT_B ELSE 0 END) AS CRITERIA_A2_AMOUNT_B,
SUM(CASE WHEN CRITERIA_A = 'Critera_A2' THEN AMOUNT_C ELSE 0 END) AS CRITERIA_A2_AMOUNT_C,
SUM(CASE WHEN CRITERIA_A = 'Critera_AN' THEN AMOUNT_A ELSE 0 END) AS CRITERIA_AN_AMOUNT_A,
SUM(CASE WHEN CRITERIA_A = 'Critera_AN' THEN AMOUNT_B ELSE 0 END) AS CRITERIA_AN_AMOUNT_B,
SUM(CASE WHEN CRITERIA_A = 'Critera_AN' THEN AMOUNT_C ELSE 0 END) AS CRITERIA_AN_AMOUNT_C,
FROM Table
GROUP BY CRITERIA_B,
CRITERIA_C
to make it dynamic see
http://beyondrelational.com/modules/2/blogs/70/posts/10791/dynamic-crosstab-with-multiple-pivot-columns.aspx
However it would be much easier to build this in SSRS reports using matrix if you can use it.
In that case just bring data as is
then add a matrix to report
Add column grouping on Criteria A and Row grouping on Criteria B and then Criteria C .
In data portion add three columns with expressions as
=SUM(Fields!Amount_A.Value)
=SUM(Fields!Amount_B.Value)
=SUM(Fields!Amount_C.Value)
then you will get exact format what you're asking for
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
OC4J 904 and Unicode(AL16UTF16) in NVARCHAR2 column
I have:
OC4J 904 standalone runs on Windows2000 AdvancedServer.
Oracle 9i
JDBC thin driver shipped with OC4J
NLS_NCHAR_CHARSET = AL16UTF16
(NLS_CHARACTERSET = VN8VN3)
I have a table with a NVARCHAR2 column. I created a CMP EJB from the table but I can't use the EJB to retreive data from Database. I was success in using Oracle JDBC connection to connect manually to database and save/retreive Unicode data.
I read somewhere that EJB use thin driver, so the getter/setter of CMP-Fields should work normally.
I think that may be the problems is the function OraclePreparedStatement.setFormOfUse(1,OraclePreparedStatement.FORM_NCHAR);
was not called in the EJB Contenner or things like that - so it's a bug of OC4J, right?.
This is the Exception I received on the browser.
javax.ejb.NoSuchObjectLocalException: ? ?ÃY CÃ CH? HOA CÃ D?U!!!!!
at TestLocal_EntityBeanWrapper0.reActivateNew(TestLocal_EntityBeanWrapper0.java:1668)
at TestLocal_EntityBeanWrapper0.reActivateNewLocal(TestLocal_EntityBeanWrapper0.java:1636)
at TestLocal_EntityBeanWrapper0.getUnicode(TestLocal_EntityBeanWrapper0.java:108)
at test.showparam._jspService(_showparam.java:100)
[SRC:/test/showparam.jsp:65]
at com.orionserver[Oracle9iAS (9.0.4.0.0) Containers for J2EE].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:348)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:293)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:602)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:308)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:779)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:264)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:107)
at com.evermind[Oracle9iAS (9.0.4.0.0) Containers for J2EE].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:536)
Can anybody help or give me some information or workaround?
Thank you very much.Hi Nghia,
Can anybody help or give me some information or
workaround? I suggest using BMP and a non-emulated data source. More details are available in the documentation which can be downloaded from here:
http://technet.oracle.com/tech/java/oc4j/904/documentation_preview.html
Good Luck,
Avi. -
JDBC program is inserting ¿ in NVARCHAR2 column.
I have a 10.2.0.1 database on a windows XP machine.
The value of NLS_CHARACTERSET is WE8MSWIN1252 and the value of NLS_NCHAR_CHARACTERSET is AL16UTF16.
I have a table with a NVARCHAR2 column. I am using JDBC thin driver to connect to the database. When I am to inserting a japanese character to this column, the value that is getting inserted is ¿ (inverted question mark) instead of the actual Japanese character. Following is the code snippet of my Java program
Class.forName("oracle.jdbc.OracleDriver");
props.put("user", "bcan");
props.put("password","bcan2226");
url = "jdbc:oracle:thin:@myserver:1521:eng";
Connection conn = DriverManager.getConnection(url, props);
String value = "abcdefghi\u7c73"; //\u7c73 is the japanese character
String sql = "insert into I18N VALUES ('" + value + "')";
Statement stmt = conn.createStatement();
stmt.executeUpdate(sql);
Can you please let me know why is ¿ getting inserted instead of the japanese character I am trying to insert?
BTW I noticed that if I use PreparedStatement like the following then the proper character gets inserted.
Class.forName("oracle.jdbc.OracleDriver");
props.put("user", "bcan");
props.put("password","bcan2226");
props.put("oracle.jdbc.defaultNChar","true");
url = "jdbc:oracle:thin:@myserver:1521:eng";
Connection conn = DriverManager.getConnection(url, props);
String value ="abcdefghi\u7c73";
String sql = "insert into I18N VALUES (?)";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1,value);
stmt.executeUpdate();
Thanks
SudiptaI do not think that you are hitting a "bug". Instead what you are seeing is expected behaviour since sql and literals (e.g. your string) are processed in the database character set unless you specify otherwise (e.g. explicit bind).
Go through docs per links in my previous post.
For the bug referenced, it seemed to be fixed according to jdbc driver Readme of 10.2.0.4. -
ORA-01461 Error when mapping table with multiple varchar2(4000) fields
(Note: I think this was an earlier problem, supposed fixed in 11.0, but we are experiencing in 11.7)
If I map an Oracle 9i table with multiple varchar2(4000) columns, targeting another Oracle 9i database, I get the ORA-01461 error (Can't bind a LONG value only for insert into a LONG).
I have tried changing the target columns to varchar2(1000), as suggested as a workaround in earlier versions, all to no avail.
I can have just one varchar2(4000) map correctly and execute flawlessly - the problem occurs when I add a second one.
I have tried making the target column a LONG, but that does not solve the problem.
Then, I made the target database SQL Server, and it had no problem at all, so the issue seems to be Oracle-related.Hi Jon,
Thanks for the feedback. I'm unable to reproduce the problem you describe at the moment - if I try to migrate a TEXT(5), OMWB creates a VARCHAR(5) and the data migrates correctly!! However, I note from you description that even though the problematic source column datatype is TEXT(5), you mention that there are actually 20 lines of text in this field (and not 5 variable length characters as the definition might suggest).
Having read through some of the MySQL reference guide I note that, in certain circumstances, MySQL actually changes the column datatype specified either at table creation time or when interfacing with other databases ( ref 14.2.5.1 Silent Column Specification Changes and 12.7 Using Column Types from Other Database Engines in the MySQL reference guide). Since your TEXT(5) actually contains 20 lines of text, MySQL (database or JDBC driver .... or both) may be trying to automatically map the specified datatype of the column to a datatype more appropriate to storing 20 lines of text.... that is, to a LONG value in this case. Then, when Oracle is presented with this LONG value to store in a VARCHAR(5) field, it throws the ORA-01461 error. I need to investigate this further, but this may be the case - its the first time I've see this problem encountered.
To workaround this, you could change the datatype of the column to a LONG from within the Oracle Model before migrating. Any application code that accesses this column and expects a TEXT(5) value may need to be adjusted to cope with a LONG value. Is this a viable workaround for you?
I will investigate further and notiofy you of any details I uncover. We will need to track this issue for possible inclusion in future development plans.
I hope this helps,
Regards,
Tom. -
Web dynpro screen with multiple rows with columns that can be edited
Web dynpro screen with multiple rows with columns that can be edited individually:
Hi
I am busy creating a screen in web dynpro for ABAP which we would like to make available via Portal ESS (Portal 7).
I need to add 'n type of table (or almost something like Excel) or something in which someone can type a few paycode numbers (there should be lets say 10 blank rows in which info can be typed in and if I click on a button or so, more rows must be added if necessary. Then in the other colums stuff like amounts must be entered which one should also be able to edit then and there.
Can anyone assist in what I can use for this? There does not seem to be some existing element that I can use.
Help will be appreciated.
Regards
DebbieHi Debbie,
Whiel Creating table you need to be care full that use chose INPUT FIELD as the CELL EDITOR. Just guessing that if ur table is not editable u might have choosen TextView as default cell editor type.
check link for details on TABLE UI
[http://help.sap.com/saphelp_erp2005/helpdata/EN/b5/ac884118aa1709e10000000a155106/frameset.htm]
easy way is to first add UI ELEMENT TABLE to your VIEW, then right click over it & select create binding from context. After you have a pop up where you can select what columns you want what should be its cell editor etc.
Greetings
Prashant -
Report with multiple dimensions in Row and Column with EvEXP
Hi
We are currently running BPC 7.0 SP3 and try to create the report(or schedule) with more 2 x 2 dimensions in the row and column.
e.g.
row dimension : Outer row is Entity, Inner row is Account
column dimension : Outer column is Time, Inner row is Category
We created the report with 2 x 2 dimensions like above e.g. with EvEXP and EvNXP, NOT EvDRE
based on default dynamic template:Template13.xlt(Nested Row, 2 x 1 dimensions defined by EvEXP and EvNXP formula).
However, when expanding the dimension with double click these dimensions or change CV of the report with 2 x 2 dimensions defined by EvEXP and EvNXP formula,
error occurs on EvEXP and EvNXP formula and can't retrieve the result correctly.
[Question]
Can't we create the report with more 2 x 2 dimensions in the row and column using EvEXP and EvNXP function ?
We understand that we can make the report with more 2 x 2 dimensions in the row and column if using EvDRE.
Thank You in advance
KenyaThank you for your advice.
I understand that we should use EvDRE when creating the report with multiple dimension in the row/column because EvEXP have some erros, poor performance, etc.
Then, we have two questions.
1)
>plus they had some errors in the designs.
what kind of errors they have as an example?
2)
>If you must build the EVEXP and EVNXP, I would suggest building the template from scratch
We built the simple template with just 2 x 2 dimension from scratch.
But this report doesn't work well when double-click the dimension or changing CV...
Would you please check the following template?
<https://sapmats-de.sap-ag.de/download/download.cgi?id=RCZE1ME4YSORY3DCDO4NNMANZLBL1L5ZBUOB2F71YVNVS8XDJW>
It would be greatly appreciated if you could give me your advice for the template.
Thank you again
And my best regards,
Kenya -
Count(*) , group by with multiple columns from multiple tables involved
Hi all,
I am relatively new to SQL.
Currently I have these few requirements, to display quite a number of fields from 3 tables for display of report.
In my query I need to:
1.) count(*)
2.) select quite a number of fields from table 1,2,3
However when count(*) is used, grouped by has to be used to.
How do I actually use group by with so many columns to be selected?
I have actually used the query below, but the count(*) returns 1, the correct output should be 3 instead.
select count(*), table1.col1, table1.col2, table1.col3, table2.col3, table2.col4, table2.col6, table3.col1, table3.col4, table3.col5
from table1, table2, table3
where
<conditions>........................
group by table1.col1, table1.col2, table1.col3, table2.col3, table2.col4, table2.col6, table3.col1, table3.col4, table3.col5
I know this group by statement looks very unrefined. How can I select multiple fields from different tables, and yet get the count(*) correctly?
Thank you so much for your time.Hmm yes it actually does return count as 1 for each row. But there are 3 rows returned. E.g.
ctr table1.col1 table1.col2 ..........
1 value1 value1
1 value2 value3
1 value3 value4
If I put the count(*) outside, it returns 3 , the correct output
ctr
3
select count(*) from
select table1.col1, table1.col2, table1.col3, table2.col3, table2.col4, table2.col6, table3.col1, table3.col4, table3.col5
from table1, table2, table3
where
<conditions>
group by table1.col1, table1.col2, table1.col3, table2.col3, table2.col4, table2.col6, table3.col1, table3.col4, table3.col5
Thus I was wondering if it was the group by of multiple colns that resulted in the count stucked at value 1. -
I have external list where i want to apply multiple filter for every column like we do in Excel spreadsheet - we can filter a spreadsheet column by selecting multiple checkbox for every column. I am using Sharepoint 2010
Is this possible in sharepoint 2010? Any idea how to acheive that?
Thanks in advance.Hi Rahul,
According to your description, my understanding is that you want to use filter with multiple values on a column of an external list in SharePoint 2010.
Per my knowledge, there is not an OOB way to achieve it. As a workaround, you can custom the web part to implement it. There is an articles for your reference:
http://blogs.telerik.com/aspnet-ajax/posts/13-11-05/add-excel-like-multi-select-filtering-to-your-asp.net-datagrid
In addition, you can use a third party solution to achieve it, please take a look at:
http://abilitics.com/Blog/index.php/sharepoint-improved-grids-with-excel-like-inline-editing/
http://social.technet.microsoft.com/forums/sharepoint/en-US/3d19b9d3-d394-4af9-9e8e-2dee70b50540/filter-column-with-multiple-filter-values-in-sharepoint-list
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Creating Select List with multiple columns
I want to create a select list with multiple columns. I followed the demo application model described in the by Denes Kubicek (Currently my reference for APEX !!)
The code is as follows:
CREATE OR REPLACE FUNCTION getcrops(p_cropid IN NUMBER)
RETURN VARCHAR2
IS
v_cropid VARCHAR2 (400);
v_fcode VARCHAR2 (400);
v_product VARCHAR2 (400);
v_var VARCHAR2 (400);
v_fname VARCHAR2 (400);
v_acres VARCHAR2 (400);
v_style_start VARCHAR2 (400);
v_style_end VARCHAR2 (400);
v_return VARCHAR2 (400);
BEGIN
FOR c IN (select "CROP"."CROPID" as "CROP ID",
"CROP"."FIELDCODE" as "FIELD CODE",
"CARROTPRODUCTLIST"."CARROTPRODUCTNAME" as "PRODUCT",
"VARIETYLIST"."VARIETYNAME" as "VARIETY",
"FIELD"."FIELDNAME" as "FIELD NAME",
"CROP"."SIZEINACRES" as "ACRES"
from "FIELD" "FIELD",
"CARROTPRODUCTLIST" "CARROTPRODUCTLIST",
"VARIETYLIST" "VARIETYLIST",
"CROP" "CROP"
where "CROP"."CARROTPRODUCTTYPE"="CARROTPRODUCTLIST"."CARROTPRODUCTID"
and "CROP"."VARIETYID"="VARIETYLIST"."VARIETYLISTID"
and "CROP"."FIELDID"="FIELD"."FIELDID")
LOOP
v_cropid := TO_CHAR (c.'CROP ID', 'FML999G999G999G999G990');
v_fcode := c.'FIELD CODE';
v_product := c.'PRODUCT';
v_var := c.'VARIETY';
v_fname :=c.'FIELD NAME';
v_acres :=c.'ACRES';
FOR i IN 1 .. 12 - LENGTH (c."CROP ID")
LOOP
v_cropid := v_cropid || ' ';
END LOOP;
FOR i IN 1 .. 12 - LENGTH (c.'FIELD CODE')
LOOP
v_fcode := v_fcode || ' ';
END LOOP;
FOR i IN 1 .. 12 - LENGTH (c.'PRODUCT')
LOOP
v_product := v_product || ' ';
END LOOP;
FOR i IN 1 .. 12 - LENGTH (c.'VARIETY')
LOOP
v_var := v_var || ' ';
END LOOP;
FOR i IN 1 .. 12 - LENGTH (c.'FIELD NAME')
LOOP
v_fname := v_fname || ' ';
END LOOP;
FOR i IN 1 .. 12 - LENGTH (c.'ACRES')
LOOP
v_acres := v_acres || ' ';
END LOOP;
v_return := v_cropid || v_fcode || v_product || v_var || v_fname || v_acres;
END LOOP;
RETURN v_return;
END;
I created this anonymous Pl/SQL function at a application level ..Then I followed up to create a select list with a function inside. However I could not create select list with the command suggested in the demo which is
select getcrops(cropid) d, cropid r from crop;
APEX (2.1) returns a error message. What am I missing ? Should the function be called from somewhere else after creating a regular select list..? Where the functions (Pl/SQL) should be ideally stored for application level access..? and for across application level access ? How can I check the function works good. Help is appreciated.Still really one column.
If they need to be independent then you've got to have three selection lists.
%
Maybe you are looking for
-
Reg: Assigning a Date value in context
Hi, Below is the code, where i am initializing a context with the date value. But the date value is not getting assigned to the context. What could be the problem? Kindly help me out. String s = "12/31/9999"; try { SimpleDateFormat sd =
-
"Crossfade" in update 2.1?
Is there a "Crossfade" feature in 2.1? Nano has it, for instance.
-
Use Apple Extreme with Comcast gateway
I recently upgraded my Comcast internet service. I received a Cisco gateway DPC3941T. I would like to use my Apple Extreme for my wifi network. In other words, I do not want to use the wifi network from the Cisco gateway. Could I get help getting
-
Identifier ''DBMS_TSDP_MANAGE" must be declared
Hello, I tried to create in my database sensitive types of column. However, after typing the command dbms_tsdp_manage.add_sensitive_type in PL/SQL block will appear error message : identifier ''DBMS_TSDP_MANAGE" must be declared. I don't know, what's
-
Library transfer to my MacBook
What is the simplest means of transferring my itunes library to my macbook? Can this be done via the ipod somehow? Thanks, Mark