Transform creates invalid doctype statement
I'm creating xhtml pages from xml using xslt. The problem is that the Transformer is producing a DOCTYPE that is missing the required spaces between the publicID and systemID, so SAXParser operations I'm doing on the output fail.
xsl:output method="html" version="4.01" encoding="ISO-8859-1"
standalone="yes"
indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
produces:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
Notice the two adjacent double quotes. That's not legal.
(Please assume all the appropriate angle brackets, I wasn't sure if they'd get through)
Is there any way to coerce this thing to put out a space there?
This bug has been reported here,
https://jaxp.dev.java.net/issues/show_bug.cgi?id=2
It will be integrated in JDK 5.0 update 13. In the meantime, you can try downloading JAXP 1.4 from https://jaxp.dev.java.net and install it on top.
Similar Messages
-
Hello everyone i am building a database/web page application using Dreamweaver 8 that allows sudents to report computer issues. The submitting works fine it stores all information to the databse my problem now is updating the database to show a problem has been fixed. I can get the website to pull up current records using but when i click on the lik that should redirect the user to the update form which pulls up the record that the user clicked on i get this error:
exception
org.apache.jasper.JasperException: Exception in JSP: /updateIssue.jsp:151
148: <table align="center">
149: <tr valign="baseline">
150: <td nowrap align="right">Cpu:</td>
151: <td><input type="text" name="cpu" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("cpu"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
152: </td>
153: </tr>
154: <tr valign="baseline">
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Invalid cursor state
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.updateIssue_jsp._jspService(updateIssue_jsp.java:284)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getString(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getObject(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getObject(Unknown Source)
org.apache.jsp.updateIssue_jsp._jspService(updateIssue_jsp.java:226)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
My code for the page is:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" %>
<%@ include file="Connections/db.jsp" %>
<%
// *** Edit Operations: declare variables
// set the form action variable
String MM_editAction = request.getRequestURI();
if (request.getQueryString() != null && request.getQueryString().length() > 0) {
String queryString = request.getQueryString();
String tempStr = "";
for (int i=0; i < queryString.length(); i++) {
if (queryString.charAt(i) == '<') tempStr = tempStr + "<";
else if (queryString.charAt(i) == '>') tempStr = tempStr + ">";
else if (queryString.charAt(i) == '"') tempStr = tempStr + """;
else tempStr = tempStr + queryString.charAt(i);
MM_editAction += "?" + tempStr;
// connection information
String MM_editDriver = null, MM_editConnection = null, MM_editUserName = null, MM_editPassword = null;
// redirect information
String MM_editRedirectUrl = null;
// query string to execute
StringBuffer MM_editQuery = null;
// boolean to abort record edit
boolean MM_abortEdit = false;
// table information
String MM_editTable = null, MM_editColumn = null, MM_recordId = null;
// form field information
String[] MM_fields = null, MM_columns = null;
%>
<%
// *** Update Record: set variables
if (request.getParameter("MM_update") != null &&
request.getParameter("MM_update").toString().equals("form1") &&
request.getParameter("MM_recordId") != null) {
MM_editDriver = MM_db_DRIVER;
MM_editConnection = MM_db_STRING;
MM_editUserName = MM_db_USERNAME;
MM_editPassword = MM_db_PASSWORD;
MM_editTable = "issue";
MM_editColumn = "cpu";
MM_recordId = "'" + request.getParameter("MM_recordId") + "'";
MM_editRedirectUrl = "COBA_home.html";
String MM_fieldsStr = "cpu|value|issue|value|comment|value|issue_Date|value|Fixed|value";
String MM_columnsStr = "cpu|',none,''|issue|',none,''|comment|',none,''|issue_Date|',none,''|Fixed|',none,''";
// create the MM_fields and MM_columns arrays
java.util.StringTokenizer tokens = new java.util.StringTokenizer(MM_fieldsStr,"|");
MM_fields = new String[tokens.countTokens()];
for (int i=0; tokens.hasMoreTokens(); i++) MM_fields[i] = tokens.nextToken();
tokens = new java.util.StringTokenizer(MM_columnsStr,"|");
MM_columns = new String[tokens.countTokens()];
for (int i=0; tokens.hasMoreTokens(); i++) MM_columns[i] = tokens.nextToken();
// set the form values
for (int i=0; i+1 < MM_fields.length; i+=2) {
MM_fields[i+1] = ((request.getParameter(MM_fields)!=null)?(String)request.getParameter(MM_fields[i]):"");
// append the query string to the redirect URL
if (MM_editRedirectUrl.length() != 0 && request.getQueryString() != null) {
MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + request.getQueryString();
%>
<%
// *** Update Record: construct a sql update statement and execute it
if (request.getParameter("MM_update") != null &&
request.getParameter("MM_recordId") != null) {
// create the update sql statement
MM_editQuery = new StringBuffer("update ").append(MM_editTable).append(" set ");
for (int i=0; i+1 < MM_fields.length; i+=2) {
String formVal = MM_fields[i+1];
String elem;
java.util.StringTokenizer tokens = new java.util.StringTokenizer(MM_columns[i+1],",");
String delim = ((elem = (String)tokens.nextToken()) != null && elem.compareTo("none")!=0)?elem:"";
String altVal = ((elem = (String)tokens.nextToken()) != null && elem.compareTo("none")!=0)?elem:"";
String emptyVal = ((elem = (String)tokens.nextToken()) != null && elem.compareTo("none")!=0)?elem:"";
if (formVal.length() == 0) {
formVal = emptyVal;
} else {
if (altVal.length() != 0) {
formVal = altVal;
} else if (delim.compareTo("'") == 0) { // escape quotes
StringBuffer escQuotes = new StringBuffer(formVal);
for (int j=0; j < escQuotes.length(); j++)
if (escQuotes.charAt(j) == '\'') escQuotes.insert(j++,'\'');
formVal = "'" + escQuotes + "'";
} else {
formVal = delim + formVal + delim;
MM_editQuery.append((i!=0)?",":"").append(MM_columns[i]).append(" = ").append(formVal);
MM_editQuery.append(" where ").append(MM_editColumn).append(" = ").append(MM_recordId);
if (!MM_abortEdit) {
// finish the sql and execute it
Driver MM_driver = (Driver)Class.forName(MM_editDriver).newInstance();
Connection MM_connection = DriverManager.getConnection(MM_editConnection,MM_editUserName,MM_editPassword);
PreparedStatement MM_editStatement = MM_connection.prepareStatement(MM_editQuery.toString());
MM_editStatement.executeUpdate();
MM_connection.close();
// redirect with URL parameters
if (MM_editRedirectUrl.length() != 0) {
response.sendRedirect(response.encodeRedirectURL(MM_editRedirectUrl));
return;
%>
<%
String IssueUpdate__MMColParam = "1";
if (request.getParameter("cpu") !=null) {IssueUpdate__MMColParam = (String)request.getParameter("cpu");}
%>
<%
Driver DriverIssueUpdate = (Driver)Class.forName(MM_db_DRIVER).newInstance();
Connection ConnIssueUpdate = DriverManager.getConnection(MM_db_STRING,MM_db_USERNAME,MM_db_PASSWORD);
PreparedStatement StatementIssueUpdate = ConnIssueUpdate.prepareStatement("SELECT * FROM issue WHERE cpu = '" + IssueUpdate__MMColParam + "' ORDER BY Fixed ASC");
ResultSet IssueUpdate = StatementIssueUpdate.executeQuery();
boolean IssueUpdate_isEmpty = !IssueUpdate.next();
boolean IssueUpdate_hasData = !IssueUpdate_isEmpty;
Object IssueUpdate_data;
int IssueUpdate_numRows = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="<%=MM_editAction%>" name="form1">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Cpu:</td>
<td><input type="text" name="cpu" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("cpu"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Issue:</td>
<td><input type="text" name="issue" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("issue"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Comment:</td>
<td valign="baseline"><textarea name="comment" cols="50" rows="5"><%=(((IssueUpdate_data = IssueUpdate.getObject("comment"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%></textarea>
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Issue_Date:</td>
<td><input type="text" name="issue_Date" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("issue_Date"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Fixed:</td>
<td><input type="text" name="Fixed" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("Fixed"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Update record">
</td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%=(((IssueUpdate_data = IssueUpdate.getObject("cpu"))==null || IssueUpdate.wasNull())?"":IssueUpdate_data)%>">
</form>
<p> </p>
</body>
</html>
<%
IssueUpdate.close();
StatementIssueUpdate.close();
ConnIssueUpdate.close();
%>
Any idea as to what I have done wrong because I am very confused right now. Thank you so much in advance for any help or adviceI am confused as well.
It would help if your data layer was separate from your display layer.
The error suggests that you are attempting to extract a result from a update. And that won't work with a standard update.
Where that is happening I have no idea. -
Is there a way to create an if statement in dreamweaver?
I am currently building a website that sells industrial seating. There is a seat called SP006 that appears both in section, "small suspension seats" and "construction". So far I have been resaving the same page twice but renaming it "sp006_construction.html".
Everything stays the same except the back button changes links, one goes to small suspension seats, the other goes to construction. Is there a way to create an if statement so that I don't have to keep resaving the same file over and over again?
Thanks.
ChantalleUpon reading your question again, I think that I initially got the wrong impression.
As I see it now, you want the same contents to go to two different documents, but want to maintain only one copy.
Making use of SSi's will solve that problem, i.e. you will still have two documents, but they will have the contents from a file called sp006.htm. The document will look like
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Small Suspension Seats - sp006</title>
</head>
<body>
<!--#include file="sp006.html" -->
</body>
</html>
The same will go for the construction seats. This way you will have one file to maintain, but it is used in two different documents.
Gramps
PS You may have to rename the file with an extension of .shtml or similar. Have a look here for more info http://en.wikipedia.org/wiki/Server_Side_Includes
Message was edited by: altruistic gramps -
Hi all,
i was using SAPB0 2007A 42Patches, try to use AP Purchase Order and AP Goods Receipt PO together add serial numbers for Item facing this error as below:
[Goods Receipt PO - Rows - Warehouse Code][line: 1], '1).[Microsoft][SQL Native Client]Invalid cursor state 'Serial Numbers for Items' (OSRI)'
[Purchase Order - Rows - Warehouse Code][line: 1], '1).[Microsoft][SQL Native Client]Invalid cursor state 'Serial Numbers for Items' (OSRI)'
Can i have the solution from anyone?
Thank you.
Best Regards,
dannyHi all,
I know the caused of it.
Because i have created triggers on these 2 table and on Serial Table.
But why so strange, i have triggers on it and nothing error like this before this scenario happened.
Cheers,
danny ng -
Hi
I want to let you know, that sometimes APEX 3.1.2.00.0 creates invalid export file.
Older apex 3.0 created correct file.
For example: our application has page button, where "Optional URL Redirect" is:
Page: &APP_PAGE_ID.
Request: FLOW_XMLP_OUTPUT_R11531800061044170_et
If we export application into file f110.sql and try to import it to the same workspace on the same server, we get error:
{color:#0000ff}ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 28, column 111: PLS-00103: Encountered the symbol "_" when expecting one of the following: ) , * & | = - + < / > at in is mod remainder not rem => .. <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ as between from using || multiset member SUBMULTISET_ The symbol &a
{color}In exported f110.sql file the invalid section is:
{color:#0000ff}wwv_flow_api.create_page_branch(
p_id=>11762805016890347 + wwv_flow_api.g_id_offset,
p_flow_id=> wwv_flow.g_flow_id,
p_flow_step_id=> 4,
p_branch_action=> 'f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:FLOW_XMLP_OUTPUT_R'||to_char({color}{color:#0000ff}{color:#ff0000}*10255206661122183_et*{color}+wwv_flow_api.g_id_offset)||':&DEBUG.:::',
p_branch_point=> 'AFTER_PROCESSING',
p_branch_type=> 'REDIRECT_URL',
p_branch_when_button_id=>11761415275883875+ wwv_flow_api.g_id_offset,
p_branch_sequence=> 10,
p_branch_comment=> 'Created 20-JUUNI-2008 12:05 by XXXX');{color}
If we exported the same application in apex 3.0, this section was correct:
{color:#0000ff}wwv_flow_api.create_page_branch(
p_id=>11762805016890347 + wwv_flow_api.g_id_offset,
p_flow_id=> wwv_flow.g_flow_id,
p_flow_step_id=> 4,
p_branch_action=> 'f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:FLOW_XMLP_OUTPUT_R*10255206661122183_et*:&DEBUG.:::',
p_branch_point=> 'AFTER_PROCESSING',
p_branch_type=> 'REDIRECT_URL',
p_branch_when_button_id=>11761415275883875+ wwv_flow_api.g_id_offset,
p_branch_sequence=> 10,
p_branch_comment=> 'Created 20-JUUNI-2008 12:05 by XXXX');{color}
Best Regards,
TõnuThanks for pointing that out. We'll fix it. It does appear though, that in 3.0, the offset would not be added to the number part of the request value, so if you installed the application as a different application ID or into a different workspace, the request would have failed.
Scott -
00900 Invalid SQL Statement error
I'm teaching myself to write stored procedures, working in TOAD 10.5 with Oracle 10g. I keep getting error ORA-00900: invalid SQL Statement. Here's the code, cut down to bare minimum sample size. I can't see where I'm doing anything wrong.
If I cut out the cursor (taking it down to just "Begin" and "End"), it does run, but I can't see anything wrong with the cursor.
Any ideas?
CREATE OR REPLACE PROCEDURE IN_PROCESS_CASES_BOS
IS
V_HELLO VARCHAR2(10);
CURSOR C_MAIN IS
SELECT 'HELLO' FROM DUAL;
BEGIN
OPEN C_MAIN;
LOOP
FETCH C_MAIN INTO V_HELLO;
EXIT WHEN C_MAIN%NOTFOUND;
END LOOP;
CLOSE C_MAIN;
END;
END IN_PROCESS_CASES_BOS;
/Hi,
You've got 2 END statements, but only 1 BEGIN.
It helps a lot if you indent your code, so that every END is right below its correspoding BEGIN, and all the code in between them is indented. The same goes for IF and LOOP statements.
When posting any formatted text on this site (not just code), type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
Try this:CREATE OR REPLACE PROCEDURE IN_PROCESS_CASES_BOS
IS
V_HELLO VARCHAR2(10);
CURSOR C_MAIN IS
SELECT 'HELLO' FROM DUAL;
BEGIN
OPEN C_MAIN;
LOOP
FETCH C_MAIN INTO V_HELLO;
EXIT WHEN C_MAIN%NOTFOUND;
END LOOP;
CLOSE C_MAIN;
END; Lose this line
END IN_PROCESS_CASES_BOS; -
Sorry to ask about Invalid Cursor State again...
I am getting this error which is really frustrating because I can't figure out why it is happening.
I am connecting to a csv file using jdbc:odbc Microsoft Text Driver.
I instantiate the ReadFortySite class in the GUI class.I then click on a jList in my main GUI and this passes the selected object to the code below. It works fine the first time but if I try to select another jList element, it throws the Invalid Cursor State error..Any Ideas??
public class ReadFortySite {
private String file;
private String path = null;
private Connection conn = null;
private Statement stmt;
private ResultSet results, col_results;
private ResultSetMetaData rsmd;
private ArrayList test_names,columnHeads;
private Object List_Selection;
/** Creates a new instance of ReadFortySite */
public ReadFortySite(String file) {
this.file = file;
ReadFile();
public void ReadFile()
try{
//path = file.getPath();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// create a connection.
/* NEED 2 TAKE HARD CODED VALUE OF E: OUT!!!! */
conn = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=E:/;Extensions=csv");
// create a Statement object to execute the query with
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
// Select everything from the specified csv file
results = stmt.executeQuery("SELECT * from ("+file+")");
//ArrayLists used to manipulate and hold test name values
columnHeads = new ArrayList();
// get column heads
rsmd = results.getMetaData();
for ( int i = 4; i <= rsmd.getColumnCount(); i++ ) {
columnHeads.add( rsmd.getColumnName( i ) );
}//end try
catch(Exception e)
System.out.println("Error " + e);
}//end method
public ArrayList getArrayList()
return columnHeads;
public ArrayList getTestValues(Object obj){
ArrayList TestValues = new ArrayList();
try{
List_Selection = obj;
//have an object representing the value selected
//need to get test results associated with that value
for(int i=1;i<rsmd.getColumnCount()+1;i++)
if(obj.equals((Object)rsmd.getColumnName(i)))
while(results.next()){
String vals = results.getString((String)obj);
TestValues.add(vals);
//System.out.println(TestValues.toString());
}//end while
}//end for
}//end try
catch (SQLException sqle)
System.out.println("Error " + sqle);
return TestValues;
}You should use code formatting when you post code, and you should also post the stack trace that you get when you run the code.
/Kaj -
ORA-00900: invalid SQL statement error in procedure
In procedure we referring only 2 tables
Tables:
1) Edw_orders_ref
2) Change_pl
Condisition:
1) whenever edw_orders_ref.product=change_pl.product and edw_orders_ref.opt=change_pl.opt condisition satisfied then update edw_orders_ref.pl with change_pl.pl column.
2) we pass table name and day values as arguments to the procedure.
3) Based on day column data only we update.
4) Heir day column means partisition values of the table
Procedure is:
create or replace procedure Proc_update_target(P_Day varchar2,p_tablename nvarchar2)
as
TYPE PlCurTyp IS REF CURSOR;
Pl_cv PlCurTyp;
--emp_rec edw_orders_ref%ROWTYPE;
pl_rec Edw_orders_ref.pl%type;
product_rec Edw_orders_ref.product%type;
opt_rec Edw_orders_ref.opt%type;
sql_stmt varchar(3200);
n number:=0;
BEGIN
sql_stmt := 'select lpl.opt,lpl.product,lpl.pl from minddba.change_pl lpl
where exists ( select 1 from '|| p_tablename ||' where '||p_tablename||'.product=lpl.product and '||p_tablename||'.opt=lpl.opt
and '||p_tablename||'.day='||P_Day||' )';
dbms_output.put_line('hi');
OPEN pl_cv FOR sql_stmt ;
LOOP
dbms_output.put_line('hello1');
FETCH Pl_cv INTO pl_rec,product_rec,opt_rec;
EXIT WHEN Pl_cv%NOTFOUND;
dbms_output.put_line('hello');
execute immediate
'update '||p_tablename||' set pl=:rpl
where product=:rproduct
and opt=:ropt
AND day=:day' using pl_rec, product_rec,opt_rec,P_Day;
if Pl_cv%rowcount=10000 then
commit;
end if;
END LOOP;
CLOSE pl_cv;
commit;
exception
when others then
dbms_output.put_line('Error while updating target pl:'||SQLERRM);
end;
it is compile nad debug.
but execution time this error was coming
exec Proc_update_target('20110226','edw_orders_ref')
hi
hello1
hello
Error while updating target pl:ORA-00900: invalid SQL statement
i think in that procedure updata statement is wrong,if any one corect them.Hi,
This are details of table structure and my requirement for that procedure
CREATE TABLE EDW_ORDERS_REF
SO_ID VARCHAR2(20 BYTE) NOT NULL,
SRC_SYS_KY NUMBER(19) NOT NULL,
DAY VARCHAR2(8 BYTE) NOT NULL,
FIN_CLOSE_DT VARCHAR2(8 BYTE) NOT NULL,
SO_LN_ITM_ID VARCHAR2(12 BYTE) NOT NULL,
EXT_EFF_TS VARCHAR2(26 BYTE) NOT NULL,
EFF_FRM_GMT_TS VARCHAR2(26 BYTE) NOT NULL,
CONTRA_FG VARCHAR2(1 BYTE) NOT NULL,
FDW_TRAN_TYPE_CD VARCHAR2(1 BYTE) NOT NULL,
SO4 VARCHAR2(4 BYTE),
SO2 VARCHAR2(2 BYTE),
PUR_AGMT VARCHAR2(20 BYTE),
SF VARCHAR2(6 BYTE),
V_BOX VARCHAR2(18 BYTE),
PL VARCHAR2(30 BYTE),
MCC_CD VARCHAR2(20 BYTE),
OPT VARCHAR2(18 BYTE),
ORDER_UNITS NUMBER(15,3),
SO_OPT_QTY NUMBER(10,3),
SO_DTL_EXT_QT NUMBER(15,3),
ORDER_LIST_LCY NUMBER(18,4),
ORDER_NET_LCY NUMBER(18,4),
ORDER_NET_CLC NUMBER(18,4),
ORDER_LIST_CLC NUMBER(18,4),
CURRENCY_CD VARCHAR2(2 BYTE),
SLS_CHNL_CD VARCHAR2(1 BYTE),
CBN VARCHAR2(20 BYTE),
GEOG_UNIT VARCHAR2(30 BYTE),
PRODUCT VARCHAR2(18 BYTE),
ORDER_NR VARCHAR2(20 BYTE),
ORDER_LINE_NR VARCHAR2(12 BYTE),
LOAD_DT DATE DEFAULT SYSDATE
CREATE TABLE MINDDBA.CHANGE_PL
PRODUCT VARCHAR2(18 BYTE) NOT NULL,
OPT VARCHAR2(3 BYTE) NOT NULL,
PL VARCHAR2(2 BYTE) NOT NULL
1) whenever edw_orders_ref.product=change_pl.product and edw_orders_ref.opt=change_pl.opt condisition satisfied then update edw_orders_ref.pl with change_pl.pl column.
2) we pass table name and day values as arguments to the procedure.
3) Based on day column data only we update.
4) Heir day column means partisition values of the table
When executing this one I got one error like
exec Proc_update_target('20110226','edw_orders_ref');
hi
hello1
hello
ORA-00900: invalid SQL statement -
Sql error ORA-00900: invalid SQL statement
Hi All
I am new to sql and i try to solve this issue i have here.
where i run this query (1) i get this message : ORA-00900: invalid SQL statement
Query : 1
WITH t1
AS (SELECT CID ,
TYPE,
TO_CHAR (
TO_DATE ('00:00:00', 'HH24:MI:SS')
+ (lg_end_time - lg_start_time),
'HH24:MI:SS') call_time,
ROW_NUMBER ()
OVER (PARTITION BY CID ORDER BY CID NULLS FIRST)
AS call_id1
FROM test_1
SELECT SUM (call_time)
FROM t1;
output:
i get error: ORA-01722: invalid number
table structure:
select * form test_1;
CID TYPE LG_END_TIME LG_START_TIME
1508643 Dispatching 2012/12/03 14:05 2012/12/03 14:02
1508643 Treatment 2012/12/03 14:00 2012/12/03 14:00
1508643 Initiation 2012/12/03 14:00 2012/12/03 14:00
1508662 Dispatching 2012/12/03 14:18 2012/12/03 14:16
1508662 Initiation 2012/12/03 14:01 2012/12/03 14:01
1508662 Treatment 2012/12/03 14:02 2012/12/03 14:01
1508643 Dispatching 2012/12/03 14:02 2012/12/03 14:00
1508662 Dispatching 2012/12/03 14:16 2012/12/03 14:02
thanks for all your helpHi All
thanks for helping and giving your support. but the at this time question remains unanswered.
with t1
as (
SELECT CID ,
TYPE,
TO_CHAR (
TO_DATE ('00:00:00', 'HH24:MI:SS')
+ (lg_end_time - lg_start_time),
'HH24:MI:SS') call_time,
ROW_NUMBER ()
OVER (PARTITION BY CID ORDER BY CID NULLS FIRST)
AS call_id1
FROM test_1
select * from t1Output:
CID TYPE CALL_TIME CALL_ID1
1508643 Dispatching 0:02:06 1
1508643 Initiation 0:00:00 2
1508643 Treatment 0:00:39 3
1508643 Dispatching 0:02:50 4
1508662 Treatment 0:01:03 1
1508662 Initiation 0:00:00 2
1508662 Dispatching 0:13:17 3
1508662 Dispatching 0:02:43 4Desired results would be :
group by CID and total time (summed) by each CID
and it will also look like:
CID TYPE CALL_TIME CALL_ID1 total_time
1508643 Dispatching 0:02:06 1
1508643 Initiation 0:00:00 2
1508643 Treatment 0:00:39 3
1508643 Dispatching 0:02:50 4
0:05:35
1508662 Treatment 0:01:03 1
1508662 Initiation 0:00:00 2
1508662 Dispatching 0:13:17 3
1508662 Dispatching 0:02:43 4
0:17:03
Create table :
CREATE TABLE TEST_1
( CID NUMBER NOT NULL,
TYPE VARCHAR2(20 BYTE) NOT NULL,
LG_END_TIME DATE NOT NULL,
LG_START_TIME DATE NOT NULL
Insert statement:
insert into test_1 VALUES (1508643,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Treatment,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Initiation,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Initiation,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Treatment,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Dispatching,03-DEC-12,03-DEC-12);Edited by: 855161 on Jan 7, 2013 8:37 AM
Edited by: 855161 on Jan 7, 2013 9:15 AM
Edited by: 855161 on Jan 7, 2013 1:00 PM -
Trying to produce report but have ERROR ORA-00900: invalid SQL statement
Hi,
I am new to Oracle so have been experimenting with a few things to get the hang of it. I have been trying to produce a report, but keep getting the error: ORA-00900: invalid SQL statement.
This happens at my first line of code where I have COLUMN <column_name> HEADING <Heading_name>
So I am a bit confused - is there a command that I am supposed to issue that indicates to SQL*Plus that I am trying to create a report?
Also, if I just delete the COLUMN <column_name> HEADING <Heading_name> rows and just start at BREAK ON <column_name> SKIP 1, it produces the same error.
I am using Oracle 8.0.6 - does this make a difference?
Here is my code:
COLUMN a.p_ctryid HEADING 'Country'
COLUMN s.p_animid HEADING 'Stallion ID'
COLUMN s.p_uname HEADING 'Stallion Name'
COLUMN a.p_animid HEADING 'Horse ID'
COLUMN d.p_careertp HEADING 'Career'
BREAK ON s.p_animid SKIP 1
BREAK ON d.p_careertp SKIP 2
COMPUTE SUM LABEL 'Total' OF d.p_careertp ON REPORT
SELECT DISTINCT a.p_ctryid, s.p_animid, s.p_uname, a.p_animid, d.p_careertp
FROM p_owby.p_animal a, p_owby.p_animal s, p_owby.p_mating m, p_owby.p_anim_dtl d
WHERE m.p_mateyr = 2001
AND a.p_animid = d.p_animid
AND a.p_animid = m.p_animid
AND a.p_animid > 0
AND s.p_animid = a.p_sire
AND a.p_ctryid IN('GB','IRE')
GROUP BY a.p_ctryid, s.p_animid, s.p_uname, d.p_careertp, a.p_animid
ORDER BY a.p_ctryid, s.p_animid, d.p_careertp
Any help would be greatly appreciated!
Thanks in advance!You are trying to do COMPUTE SUM ... ON REPORT but there is no BREAK ON REPORT specified. The computed sum will not be shown unless you also break on report. see below demonstration. first select has no sum even though we have specified COMPUTE. The second select shows the sum since now we have done break on report.
SQL> compute sum of sal on report
SQL> select * from scott.emp order by empno ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
14 rows selected.
SQL> break on report
SQL> select * from scott.emp order by empno ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
sum 29025
14 rows selected.
SQL> -
OWB Deployment Error: Invalid Sql Statement
Hi,
I am getting a error (Deployment Failure) on deploying my map. The map was
successfully deployed before. But suddenly after wards in a later deployment,
this error was given. Dropped the package.. and then still only the package spec was getting created in database, and not the body. Deployment Failure with the
message "Invalid SQL statement".
I have no clue ,where to start debugging from.
hav checked all SETOP and JOINER., and they are fine.
any idea , pls let me know..
it s too urgent.
Thanks and RegardsHi,
have you checked the package that was created in the target schema? Examining it may help you to identify the problem.
Regards,
Carsten. -
Invalid SQL Statement when using execute for running Procedures
Hi ,
I create a simple stored procedure , it was created successfully , when i tried to run the StoredProcedure , it is giving me
exec myStoredProcedure() ;
please tell me why this is coming .hi
i am using oracle 10g with asp.net
i have created a procedure and it executed successfully, when i executed with exce <storedproc>
but when i call up this procedure with .net it is giving an error like this..
ERROR [42000] [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement
any one pls suggest me how to resolve this issue
here is my stored procedure
create or replace
procedure sp_AddTrial (parStudyName VARCHAR2, parContactName VARCHAR2, parContactNumber varchar2, parDescription varchar2, parFactorName in varchar2, parTreatmentName in varchar2) is
Pos int;
Pos1 int;
parName varchar2(50);
parTName varchar(30);
parFactorNames varchar2(500);
parTreatments varchar2(500);
parWeight int;
parValue varchar2(20);
parValue1 varchar2(20);
parValue2 varchar2(20);
parValue3 varchar2(20);
begin
parFactorNames :=parFactorName;
parTreatments :=partreatmentname;
insert into mivrs_studyinfo(
study_id,
study_name,
contact_name,
phone_number,
description,
created_date,
modified_date
values
mivrs_studyinfo_seq.NEXTVAL,
parStudyName,
parContactName,
parContactNumber,
parDescription,
sysdate,
sysdate
if parTreatments is not null then
parTreatments := Concat(TRIM(parTreatments),',');
Pos1 := INSTR(parTreatments,',');
insert into temp values(1,'test');
IF length(parTreatments)!= 0 then
WHILE Pos1 > 0
loop
insert into temp values(2,Pos1);
parTName := TRIM(SUBSTR(parTreatments,0, Pos1 - 1));
parTreatments := SUBSTR(parTreatments,Pos1 + 1);
Pos1 := INSTR(parTreatments,',', 1);
parWeight := TRIM(SUBSTR(parTreatments,0, Pos1 - 1));
IF length(parTName) != 0 then
insert into mivrs_treatments (treatment_id, treatment_name, weight, study_id, created_date, modified_date) values (mivrs_treatments_seq.NEXTVAL, parTName, parWeight, mivrs_studyinfo_seq.CURRVAL,sysdate, sysdate);
end if;
parTreatments := SUBSTR(parTreatments, Pos1+1);
Pos1 := INSTR(parTreatments,',');
END loop;
END IF;
end if;
if parFactorNames is not null then
parFactorNames := Concat(TRIM(parFactorNames),',');
Pos := INSTR(parFactorNames,',');
IF length(parFactorNames)!= 0 then
WHILE Pos > 0
loop
parName := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue1 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue2 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue3 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
IF length(parName) != 0 then
insert into mivrs_stratificationfactors (factor_id, factor_name, study_id, value1,value2,value3,value4) values (mivrs_stratfactors_seq.NEXTVAL, parName, mivrs_studyinfo_seq.CURRVAL,parValue,parValue1,parValue2,parValue3);
end if;
parFactorNames := SUBSTR(parFactorNames, Pos+1);
Pos := INSTR(parFactorNames,',');
END loop;
END IF;
end if;
end;
thank u
Sowjanya -
Lots of SSOExceptions: Invalid session state
Hi forum,
I've lots of following messages in the gateway (version 6.2) logging. Can someone explain what these mean and what a possible cause is?
4/12/05 3:47:26 PM CEST: Thread[Thread-531,5,main]
ERROR: SSOUtil: Unable to create SSOToken ->
com.iplanet.sso.SSOException: AQIC5wM2LY4Sfcxug2GQWBYUCzW8CSeJoREmW776p/YjJXw= Invalid session state
AQIC5wM2LY4Sfcxug2GQWBYUCzW8CSeJoREmW776p/YjJXw=
at com.iplanet.sso.providers.dpro.SSOProviderImpl.createSSOToken(SSOProviderImpl.java:155)
at com.iplanet.sso.SSOTokenManager.createSSOToken(SSOTokenManager.java:296)
at com.sun.portal.util.SSOUtil.getSSOTokenNoDecode(Unknown Source)
at com.sun.portal.util.SSOUtil.getSSOToken(Unknown Source)
at com.sun.portal.rproxy.configservlet.client.UserProfile.<init>(Unknown Source)
at com.sun.portal.rproxy.connectionhandler.BasicAuthentication.getPassword(Unknown Source)
at com.sun.portal.rproxy.connectionhandler.HTTPRetriever.getResponse(Unknown Source)
at com.sun.portal.rproxy.connectionhandler.Session.retrieveResponse(Unknown Source)
at com.sun.portal.rproxy.connectionhandler.Session.processProtocolRequest(Unknown Source)
at com.sun.portal.rproxy.connectionhandler.Session.processNextRequest(Unknown Source)
at com.sun.portal.rproxy.server.RequestProcessor$1.run(Unknown Source)
at com.sun.portal.util.ThreadPoolThread.run(Unknown Source)
Regards,
Bram AbbekerkWe also have this message in the logs.
We asked the sun support and it's not an error.
Take a look at bug-id 5069425 for more information: http://sunsolve.sun.com/search/document.do?assetkey=urn:cds:docid:1-1-5069425-1 -
Creating and closing statements
Hi
I am new 2 JDBC and have a few doubts,
I need 2 move forward and backwards in the resultset, i am using the following declaration for that
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
can i use the same declaration for the resultsets where i only need 2 move forward?
also i use different functions for running different queries, should i create n close statements seperately in each function, or should i create statement once n for all wen im loading the driver and use that in all da functions?
thanks a ton!You can use it but before using it for second time. you have to make it null.No. No. No. Setting it to null does nothing particularly good for you. it makes the object eligible for garbage collection, which is going to happen anyway as soon as the Statement is reused.
You need to call close() before reusing a Statement (or PreparedStatement).
If your code has any chance of ever being used in a multi-threaded environment (such as a web service), then you should use local Statement objects. There are also a lot of good design reasons for making them local, but for a single-threaded application, you certainly could use a single global Statement. -
Invalid Cursor state Exception - Help required
Hi,
I'm having a web page(JSP), which is making use of 3 ResultSet objects. Using the first two, i'll populate two different Drop down list, with values from database(Access) while loading the page for first time.
Now if the user select any value from any (or both) of drop down list and clicks submit, i need to display all values in database, meeting the criteria from first & second drop down list. For this selection, i'm using the third ResultSet variable. While executing the query, i'm sure that 3rd ResultSet is returning some value. But when i try to retrieve the value to a string variable, i'm getting the Invalid cursor state exception.
Throughout the page, i haven't closed any of the ResultSet. When i closed the first and second ResultSets in the third function(where 3rd ResultSet is used), i'm not getting any value. Its returning like ResultSet closed.
Please help me to get this solved. It's very urgent because without this, i cannot proceed further. Please share your ideas.
Thanks in advace for your valuable helpIf you open a new resultset within the same statement, all previously opened will be closed.
Read the API docs, luke.
Maybe you are looking for
-
Cisco ASA 5505 site to site Multiple subnet.
Hi. I need some help configuring my cisco asa 5505. I've set up a VPN tunnel between two ASA 5505 Site 1: Subnet 192.168.77.0 Site 2: Have multiple vlans and now the tunnel goes to vlan400 - 192.168.1.0 What I need help with: From site 1 i need to be
-
Hi, I want to write a rules like this: If price in USD is null and (price in RUS is not null and exchange rate is not null) then calculate price in USD from RUS and exchange rate. How can I test null or not null in Hyperion Planning? Thank you
-
I can't acess or edit music on my iPod through iTunes...help please!
Hey, Recently I haven't been able to select or edit the music that's currently on my iPod, my iPod appears in the left hand menu bar but all the music is greyed out and inaccessible. I can't figure out why it has suddenly done this, but I think it ma
-
My husband has the ipod mini and already has his itunes set up with over 500 songs. I just got the new 5th generation ipod. If I install the software that came with my ipod will it erase all of his playlists? Will the computer recognize these are 2 d
-
Insert performance on a table with schema based XMLType column
Hi, We are inserting around 500K rows into a table which has one XMLType column (schema based). Schema is simple and the size of the XMLType column is also not very large (on an average only around 100 bytes (max might be around 1k-2k), but it takes