Error in sql statement using names having '&'
I am trying a query to update name to "WALK & TALK"..It gives me error as it considers Talk as input parameter..and expects its value ..when try to execute
Hi
Before inserting SET DEFINE OFF.
raja
Similar Messages
-
Error in SQL Statement: SAPSQL_INVALID_TABLENAME
Hello all,
While displaying contents of infocube i am getting strange error ..
Error in SQL Statement: SAPSQL_INVALID_TABLENAME ABC
Message no. DBMAN256
( Table name length is 16 )
I am able to see the contents of Fact table.
Could not found any solution till now.. Any lights , views will be very much helpful.
Regards
Nimeshhi Nimesh,
check oss note 835816
Symptom
When you execute a query, a data-mart, SEM, APO or similar access, an SQL error 4004 occurs "Unknown table name" Open SQL: Short dump with UNCAUGHT_EXCEPTION CX_RSR_X_MESSAGE in the ABAP Call Stack, you find the RSDRC_BASIC_DB_QUERY_DATA_GET function module.
Prior to this, relatively large datasets (more than 10%) were deleted from the InfoCube.
Other terms
Business Information Warehouse, Factview, DBMAN256, DBMAN
256, SAPLRSDRS, DELETE, DELETE_FACTS, RSDRD_DELETE_FACTS
Reason and Prerequisites
During the purge, the fact tables are rebuilt again as of a certain percentage, for performance reasons. The factview is then not created again.
Solution
Views that are already missing can be compiled again with the SAP_FACTVIEWS_RECREATE report.
The correction prevents the problem reappearing.
BW 3.0B
Import Support Package 27 for 3.0B (BW3.0B Patch27 or SAPKW30B27) into your BW system. The Support Package is available whennote 0723258 with the short text "SAPBWNews BW3.0B Support Package 27", which describes this Support Package in more detail, is released for customers.
BW 3.10 Content
Import Support Package 21 for 3.10 (BW3.10 Patch21 or SAPKW31021) into your BW system. The Support Package is available whennote 0723263 with the short text "SAPBWNews BW3.1 Content Support Package 21", which describes this Support Package in more detail, is released for customers.
BW 3.50
Import Support Package 13 for 3.5 (BW3.50 Patch13 or SAPKW35013) into your BW system. The Support Package is available when note 0765114 with the short text "SAPBWNews BW Support Package 13 NetWeaver'04 Stack 13", which describes this Support Package in more detail, is released for customers.
In urgent cases you can use the correction instructions.
These notes may already be available before the Support Package is released, to make information available in advance. However, the short text then still contains the words "preliminary version". -
Hi,
Can anyone see why I am getting this error message for my SQL query?
WITH SKU_DATA AS (
SELECT /*+ MATERIALIZE */ DISTINCT FROM_LOC_ID,
SKU_ID,
DESCRIPTION,
UPDATE_QTY,
ORDER_ID,
CONSIGNMENT,
WEIGHT,
PALLET_ID,
CASE
WHEN Upd_Qty_Ratio < 1
THEN TO_CHAR(UPDATE_QTY) || 'U'
WHEN TRUNC(Upd_Qty_Ratio) = Upd_Qty_Ratio
THEN TO_CHAR(Upd_Qty_Ratio) || 'C'
ELSE TO_CHAR(TRUNC(UPDATE_QTY)) || 'C' || ' ' || TO_CHAR(ROUND(MOD(Upd_Qty_Ratio, 1) * USER_DEF_NUM_3, 6)) || 'U'
END CU_Sum
FROM (
SELECT DISTINCT
FROM_LOC_ID,
S.SKU_ID,
S.DESCRIPTION,
ITL.UPDATE_QTY,
S.USER_DEF_NUM_3,
OH.ORDER_ID,
ITL.CONSIGNMENT,
ITL.PALLET_ID,
NVL(ITL.UPDATE_QTY,0)*NVL(S.EACH_WEIGHT,0) Weight,
ITL.UPDATE_QTY/(CASE S.USER_DEF_NUM_3 WHEN 0 THEN 1 ELSE S.USER_DEF_NUM_3 END) Upd_Qty_Ratio
FROM INVENTORY_TRANSACTION ITL, SKU S, LOCATION L, ORDER_HEADER OH
WHERE ITL.SKU_ID = S.SKU_ID
AND ITL.CODE = 'Pick'
AND ITL.CONSIGNMENT = $P{Consignment}
AND OH.ORDER_DATE = TO_CHAR($P{Date}, 'DD-Mon-YYYY')
AND OH.ORDER_ID = ITL.REFERENCE_ID
AND ITL.TO_LOC_ID = 'CONTAINER'))
SELECT DISTINCT ORDER_ID, CONSIGNMENT, WEIGHT, PALLET_ID, CU_Sum,
(SELECT NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'U') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'C',NULL) END)),'0') ||'C' || ' ' || NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'C') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'U',NULL) END)),'0') ||'U' FROM SKU_DATA) AS Total_Cu_Sum
FROM SKU_DATAThanks in advance.
SM.Hi Sean,
It is saying error executing SQL statement, but with no "ORA error" so maybe its a Jasper Reports error i'm not too sure.
And this is a different version of the one we done together, that one is running fine just having problems putting the jasper file on to the server. I'm just using the main bits from the original SQL.
SM -
Report -Error in SQL Statement
Hi to All,
Whe I ran the report on ODS its giving the following error.
Error Error in SQL Statement:DBIF_RSQL_INVALID-RSQL
Error Error When generating the SQL statement
Error reading the data of Infoprovider ZABCXX
Abort system error in Program SAPLRRK0 and form RSRDR;SRRK0F30-01
Note:ZABCXX is a Multiprovider
Then I identified data type is mismatched for 4 characteristics in ODS , I have changed the data type from Date to Char then deleted the data from ODS and reloaded the six Init packages with different selections.
After reloading I ran the report still same error its showing.
Is any bug in stadard program?
Pls can anyody throw some light on my problem.
Thanks,
Sha.Hi,
Try using transaction code ListCube and see if you are able to see some entries in BW system itself.
Also in RSRT -> Query -> Environment -> Delete old abaps
Also in RSRT -> Query -> Environment -> Generate Queries
And let us know the outoput .
Hope that helps.
Regards
Mr Kapadia
Assigning points is the way to say thanks in SDN. -
SQL error, Error in SQL statement
hi all,
in our project we are using 0SD_C03. while i creating aggrigates it's showining "SQL error" and Error in SQL statement.
please provide me some inputs.
sasidharcheck:
Aggregate issue
Problems with BITMAPINDEX under ORACLE in BW
SAP Note Number: 159779
No 'Star Transformation' for a Hierarchy Changerun
SAP Note Number: 934281 -
Error in SQL Statement: SAPSQL_INVALID_TABLENAME /BI0/V0FIGL_C01F
Hi,
When I am executing datasource 80FIGL_C01 using T.code RSA3 in BW3.5, getting error Error in SQL Statement: SAPSQL_INVALID_TABLENAME /BI0/V0FIGL_C01F
I am getting same error when pulling data from BW3.5 to BI7.0 at scheduling.
Can I have your valuable insights on this.
Thanks in advance!
SapnaHi,
Try the report sap_factviews_recreate. Warning: the program generate the views for all infocubes. When you don't want to do this, debug the abap and delete the infocubes from the table G_T_CUBE.
Or activate the infocube and re-generate the datasource.
Sven -
'Missing select' error for update statement using WITH clause
Hi,
I am getting the below error for update statement using WITH clause
SQL Error: ORA-00928: missing SELECT keyword
UPDATE A
set A.col1 = 'val1'
where
A.col2 IN (
WITH D AS
SELECT col2 FROM
(SELECT col2, MIN(datecol) col3 FROM DS
WHERE <conditions>
GROUP BY PATIENT) D2
WHERE
<conditions on A.col4 and D2.col3>Hi,
The format of a query using WITH is:
WITH d AS
SELECT ... -- sub_query
SELECT ... -- main query
You don't have a main query. The keyword FROM has to come immediately after the right ')' that ends the last WITH clause sub-query.
That explains the problem based on what you posted. I can't tell if the real problem is in the conditions that you didn't post.
I hope this answers your question.
If not, post a complete test script that people can run to re-create the problem and test their ideas. Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Hi Everyone,
I would like to create an error package say PKG_ERROR that has a procedure say LOG_ERROR. The LOG_ERROR procedure will basically logs the following in a table
ERROR_ID
-> SEQ_ERROR_ID.NEXTVAL
CREATED_DATE
-> SYSDATE
HOST_NAME
-> SELECT sys_context('USERENV', 'HOST') FROM dual;
IP_ADDRESS
-> SELECT sys_context('USERENV', 'IP_ADDRESS') FROM dual;
OS_USER
-> SELECT sys_context('USERENV', 'OS_USER') FROM dual;
SESSION_USER
-> SELECT sys_context('USERENV', 'SESSION_USER') FROM dual;
SCHEMA_NAME
-> SELECT sys_context('USERENV', 'CURRENT_SCHEMA') FROM dual;
ERROR_CODE
-> SQLCODE
ERROR_MESSAGE
-> SQLERRM
ERROR_STACK
-> DBMS_UTILITY.FORMAT_ERROR_STACK
CALL_STACK
-> DBMS_UTILITY.FORMAT_CALL_STACK
SQL_STATEMENT
-> ????
My problem now is how to get the SQL_STATEMENT that caused the error.
I'll be using the PKG_ERROR.LOG_ERROR procedure as follows:
PROCEDURE SP_TEST
IS
v_NUMBER NUMBER;
BEGIN
SELECT 1 / 0
INTO v_NUMBER
FROM DUAL;
EXCEPTION
WHEN OTHERS THEN
PKG_ERROR.LOG_ERROR(param_1, param_N);
END PROCEDURE SP_TEST;
I tried numerous codes and place them on the PKG_ERROR.LOG_ERROR procedure but to no avail:
#1
-- did not return the ERROR'd SQL Statement
SELECT q.sql_text
INTO captured_sql
FROM gv$sql q, gv$sql_cursor c, gv$session s
WHERE s.audsid = USERENV('sessionid')
AND s.prev_sql_addr = q.address
AND q.address = c.parent_handle;
#2
-- Only works in Database Error Trigger (I would like a solution via Package)
DECLARE
l_text ora_name_list_t;
l_n number;
BEGIN
dbms_output.put_line( '--------------------' );
dbms_output.put_line('statment causing error: ' );
l_n := ora_sql_txt( l_text );
FOR i in 1 .. nvl(l_text.count,0)
LOOP
dbms_output.put_line(l_text(i) );
END LOOP;
dbms_output.put_line( 'error text: ' );
FOR i IN 1 .. ora_server_error_depth
LOOP
dbms_output.put_line(ora_server_error_msg(i) );
END LOOP;
dbms_output.put_line( '--------------------' );
END;
#3
-- as per PSOUG it is returns the first 4K bytes of the current SQL that triggered the fine-grained auditing event. (I'm not using FGA)
SELECT sys_context('USERENV', 'CURRENT_SQL') FROM dual;
Is it possible??
Thanks,
Henry Wu<My problem now is how to get the SQL_STATEMENT that caused the error.>
We use a location variable that indicates where in a program the error occurred, something like
variable v_location_c VARCHAR2(10);
v_location_c := '1000000000';
UPDATE ...
EXCEPTION
WHEN OTHERS THEN
log_error('program_name',user,v_location_c, ...) -
Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/ZREVISQTY
Dear Guys,
Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
Manythanks
ArunDear Guys,
Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
Manythanks
Arun -
Hi ,
I am working on SAP BW 3.5.
while downloading the records through infospoke and giving them to the Application server side, I am getting an error "Error in SQL Statement: DBIF_RSQL_INVALID_RSQL".
Daily the Infospoke runs on delta mode. But for downloading of few records i have deactivated the delta and changed it in to Full mode. After downloading the data I again Activated the delta.but while Executing on Background mode I am getting an error mentioned above.
can anyone please suggest a solution for resolving this error?
Thanks in advance.
Santosh.Hi:
Did you do some recent change in the objects?. I face sometimes this error and it is due to misalignment among the objects in a data flow (cubes, DSOs, transformations, DTPs, etc.).
What you can do is activate everything again.
Best regards. -
Error in SQL Statement (ODS data loading Error)
Hello Gurus...
I am trying to loading the data Info Source To ODS in my ODS Key Figure Z_IVQUA (Invoice Quantity)
is getting the Error Message Data shows 0 from 0 Records.
I was Remove the Key Field from ODS Then try to load the data but i am getting same Error..
Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/Z_INVQUA
Errors in source system
Please Suggest....
Thanks
PrakashHello All...
Really appreciate if you can give me some advise. Thanks.
Prakash
Edited by: Prakash M on Jan 14, 2009 2:14 PM -
RMAN-10006: error running SQL statement: alter session set remote_dependenc
Backups are failing with following error
RMAN-00554: initialization of internal recovery manager package failed
RMAN-12001: could not open channel default
RMAN-10008: could not create channel context
RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
Not able to change to signature
SQL> alter session set remote_dependencies_mode=signature;
ERROR:
ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
be from among MANUAL, AUTO
I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
Parameter type
String
Syntax
REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value
TIMESTAMP
Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM
=======================================
I believe it could be because of following bug
"A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
I appreciate your effort in fixing this issue.
Edited by: user10610722 on Nov 25, 2008 4:37 PMHi:
It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe). -
Help! Syntax Error in SQL statement
Hello. I'm getting an error message and I'm just not seeing
where I went wrong. The SQL statement is:
updateSQL = "UPDATE TrainingHistory SET Status='" &
fFormat(Request.Form(cStatus)) & "', StatusComments='" &
fFormat(Request.Form(cStatusComments)) & " WHERE Training_ID="
& fFormat(Request.Form(cTrainingID))
The error message is:
[Microsoft][ODBC Microsoft Access Driver] Syntax error in
string in query expression '' WHERE Training_ID=9054'.
I've been looking at it for a while. Not sure where I went
wrong. Here is a more complete version of the code:
<%
Function fFormat(vText)
fFormat = Replace(vText, "'", "''")
End Function
Sub sRunSQL(vSQL)
set cExecute = Server.CreateObject("ADODB.Command")
With cExecute
.ActiveConnection = MM_coldsuncrea_lms_STRING
.CommandText = vSQL
.CommandType = 1
.CommandTimeout = 0
.Prepared = true
.Execute()
End With
End Sub
If Request.Form("action")="update" Then
'Set variables for update
Dim updateSQL, i
Dim cTrainingID, cStatus, cStatusComments
'Loop through records on screen and update
For i = 1 To fFormat(Request.Form("counter"))
'Create the proper field names to reference on the form
cTrainingID = "Training_ID" & CStr(i)
cStatus = "Status" & CStr(i)
cStatusComments = "StatusComments" & CStr(i)
'Create the update sql statement
updateSQL = "UPDATE TrainingHistory SET Status='" &
fFormat(Request.Form(cStatus)) & "', StatusComments='" &
fFormat(Request.Form(cStatusComments)) & " WHERE Training_ID="
& fFormat(Request.Form(cTrainingID))
'Run the sql statement
Call sRunSQL(updateSQL)
Next
'Refresh page
Response.Redirect("ClassUpdateRoster.asp?Training_ID=") &
(rsClassDetails.Fields.Item("event_ID").Value)
End If
%>You need another single quote after the double quote before
the WHERE clause. You are not closing the single quote you used to
delimit the value for StatusComments. -
sir i am wrintng below an sql statement which i am using in jdbc program ..i am geetin strings date and city from users..plzz tell me how to remove the error...
ResultSet rs=stmt.executeQuery("SELECT * FROM '"+city+"' WHERE DAT='"+user+"'");
thnks in advance
NikunjIf city is the variable which holds the table name, then it must be,
"SELECT * FROM "+city+" WHERE DAT = ";
If dat is a date/time field in the table, then,
"SELECT * FROM "+city+" WHERE DAT = #"+user+"#";
If dat is a text type,
"SELECT * FROM "+city+" WHERE DAT = '"+user+"'";
This holds good for MS-Access, I think you are working on MS-Access.
Sudha -
Execute Dynamic SQL statement using procedure builder
i want to execute a dynamic SQL statment using procedure builder not using forms
because my statement depending on a variable table name
i know that i can do that from forms using
FORMS_DDL('SQL_STAT');
but i wanna to use the procedure builder
which function i should use and how?
please explain in example if you don't mind.
thanksHi,
You can very well use DBMS_SQL Package supplied by Oracle for doing this.
Search for DBMS_SQL in OTN. You will get all info regarding this.
Regards.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by itslul:
i want to execute a dynamic SQL statment using procedure builder not using forms
because my statement depending on a variable table name
i know that i can do that from forms using
FORMS_DDL('SQL_STAT');
but i wanna to use the procedure builder
which function i should use and how?
please explain in example if you don't mind.
thanks<HR></BLOCKQUOTE>
null
Maybe you are looking for
-
How can I get my messages to display as full screen?
When my mail displays, I cannot see a full screen message, because of the mailbox information on the left side.
-
Elements 8 color scheme and panel bin - ugh!
I just upgraded from Elements 5 and I'm beginning to regret it. First, the colour scheme is dull, dull, dull, and more importantly, difficult to read. Whoever chose to use a black background with tiny white text doesn't understand visual design. I
-
Server 2012 RDS - User Profile Disks - Errors during Logoff
I have set up a test Server 2012 RDS collection (Single Server for now) and implemented User Profile disks. I have two problems. First: My generic test user can connect and does successfully use the user profile disk as expected. However, at logoff,
-
Disable 'graphics hardware enhancements' in Photoshop CS6?
Hi Everyone, I have what is hopefully a straightforward question: I'm running Photoshop CS6 on a virtual machine. (That sounds weird but believe me when I say it works fine in a VDI environment and that's not the issue.) When it launches, it predicta
-
Bluetooth connectivi​ty for PXIe-1071, PXIe-8133
Hi, There are about 24 numbers of NI PXIe-1071 chassis with PXIe-8133 controllers in our lab. I would like to interface a Bluetooth device (EEG and ECG monitors) with the DAQ. The DAQs are running Windows 7 and LabVIEW. How would you suggest I connec