MISSING EXPRESSION
can you please help? It gives an error with the line DATA_SET OPEN for DB_QUERY; expression.can missing does not solve:-
PROCEDURE FORMA4_25_11)
P_GO IN VARCHAR2,
P_DATE_1 IN VARCHAR2,
P_DATE_2 IN VARCHAR2,
P_DAY_COUNT NUMBER,
DATA_SET ON SYS_REFCURSOR)
AS
DB_QUERY VARCHAR (32767).
BEGIN
DB_QUERY: = ' SELECT T1.ad, T1.admin_count, T1.cnt)
SELECT dc.NAME ad,
Count (am. IDN) admin_count,.
Admn.Say NTC
SINCE DC dictionaries.customs
INNER JOIN kadr.tper_master mf
ON mf.branch_code = dc.code_int AND mf.status = 0
INNER JOIN vpdgk.vp_admin am
ON am.mufet_id = mf.idn
LEFT JOIN (SELECT branch_code,
Say Count (branch_code) AS
OF (m_id SELECT c.mufet_id,
b.branch_code,
Count (c.mufet_id) mufet_count
OF vpdgk.vp_qeydiyyat A
INNER JOIN kadr.tper_master b
ON b.idn = a.mufet_id
INNER JOIN vpdgk.vp_admin c
ON c.mufet_id = A.mufet_id
AND (c.uid_ IS NOT NULL
GOLD c.uid_reserv IS NOT NULL)
INNER JOIN dictionaries.customs d
ON d.code_int = b.branch_code
WHEN Trunc (A.insert_date) BETWEEN
TO_DATE('''||) P_DATE_1 | " ', "DD. MM YYYY ")
AND
TO_DATE('''||) P_DATE_2 | " ', "DD. MM YYYY ")
C.mufet_id GROUP, b.branch_code
HAVING COUNT (c.mufet_id) < ' | P_DAY_COUNT |')
GROUP BY branch_code Admn)
ON admn.branch_code = dc.code_int
Dc.NAME, admn.say) T1 WHERE T1.ad = ' | P_GO | ";
DATA_SET OPEN FOR DB_QUERY;
END;
Pls check.
PROCEDURE FORMA4_25_11)
P_GO IN VARCHAR2,
P_DATE_1 IN VARCHAR2,
P_DATE_2 IN VARCHAR2,
P_DAY_COUNT NUMBER,
DATA_SET ON SYS_REFCURSOR)
AS
DB_QUERY VARCHAR (32767).
BEGIN
DB_QUERY: = ' SELECT T1.ad, T1.admin_count, T1.cnt)
SELECT dc.NAME ad,
Count (am. IDN) admin_count,.
Admn.Say NTC
SINCE DC dictionaries.customs
INNER JOIN kadr.tper_master mf
ON mf.branch_code = dc.code_int AND mf.status = 0
INNER JOIN vpdgk.vp_admin am
ON am.mufet_id = mf.idn
LEFT JOIN (SELECT branch_code,
Say Count (branch_code) AS
OF (m_id SELECT c.mufet_id,
b.branch_code,
Count (c.mufet_id) mufet_count
OF vpdgk.vp_qeydiyyat A
INNER JOIN kadr.tper_master b
ON b.idn = a.mufet_id
INNER JOIN vpdgk.vp_admin c
ON c.mufet_id = A.mufet_id
AND (c.uid_ IS NOT NULL
GOLD c.uid_reserv IS NOT NULL)
INNER JOIN dictionaries.customs d
ON d.code_int = b.branch_code
WHEN Trunc (A.insert_date) BETWEEN
TO_DATE ("' P_DATE_1" ', "DD.) MM YYYY ")
AND
TO_DATE ("' P_DATE_2" ', "DD.) MM YYYY ")
C.mufet_id GROUP, b.branch_code
HAVING COUNT (c.mufet_id)<>
GROUP BY branch_code Admn)
ON admn.branch_code = dc.code_int
Dc.NAME, admn.say) T1 WHERE T1.ad = ' P_GO ";
DATA_SET OPEN FOR DB_QUERY;
END;
Tags: Database
Similar Questions
-
SQL Loader Missing expression error.
Hi guru
I'm updating data from csv to database table. Here I am attaching my control file and log file... you can help resolve the following error message.
Control file:
Thanks and greetingsLOAD DATA INFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.csv' BADFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.bad' DISCARDFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.dsc' INTO TABLE MSBLIVE_OBJECTS INSERT FIELDS TERMINATED BY "," optionally enclosed by '"' trailing nullcols ( INDEX_NAME CHAR "trim(Index)", TABLE_NAME CHAR "trim(Table)", VIEW_NAME CHAR "trim(View)", TRIGGER_NAME CHAR "trim(Trigger)", SEQUENCE_NAME CHAR "trim(Sequence)", PROCEDURE_NAME CHAR "trim(Procedure)", PACKAGE_NAME CHAR "trim(Package)", PACKAGE_OBJECT CHAR "trim(Package Body)", FUNCTION_NAME CHAR "trim(Function)" ) {code} *Error log:* {code} SQL*Loader: Release 10.2.0.1.0 - Production on Wed Nov 24 14:31:05 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: simple_load.ctl Data File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.csv Bad File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.bad Discard File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.dsc (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table MSBLIVE_OBJECTS, loaded from every logical record. Insert option in effect for this table: INSERT TRAILING NULLCOLS option in effect Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- INDEX_NAME FIRST * , O(") CHARACTER SQL string for column : "trim(Index)" TABLE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Table)" VIEW_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(View)" TRIGGER_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Trigger)" SEQUENCE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Sequence)" PROCEDURE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Procedure)" PACKAGE_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Package)" PACKAGE_OBJECT NEXT * , O(") CHARACTER SQL string for column : "trim(Package Body)" FUNCTION_NAME NEXT * , O(") CHARACTER SQL string for column : "trim(Function)" Record 1: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 2: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 3: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 4: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 5: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 6: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 7: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 8: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 9: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 10: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 11: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 12: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 13: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 14: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 15: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 16: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 17: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 18: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 19: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 20: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 21: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 22: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 23: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 24: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 25: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 26: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 27: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 28: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 29: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 30: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 31: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 32: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 33: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 34: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 35: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 36: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 37: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 38: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 39: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 40: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 41: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 42: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 43: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 44: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 45: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 46: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 47: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 48: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 49: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 50: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression Record 51: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME. ORA-00936: missing expression MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run. Table MSBLIVE_OBJECTS: 0 Rows successfully loaded. 51 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 148608 bytes(64 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 64 Total logical records rejected: 51 Total logical records discarded: 0 Run began on Wed Nov 24 14:31:05 2010 Run ended on Wed Nov 24 14:31:34 2010 Elapsed time was: 00:00:29.71 CPU time was: 00:00:00.03
SaamiHello
You can set your syntax for all areas (example here for only one field):
INDEX_NAME CHAR "trim(:INDEX_NAME)",
You can only refer to the names used as domain names.
Herald tiomela
http://htendam.WordPress.com -
Function pivot and Missing expression error
Select * from)
Select T.PAT_MRN_ID, T.ABBREVIATION, TBL_WORKLFOw CONCEPT_VALUE T
)
Pivot
(
Max (concept_value)
abbreviation (select short for TBL_WORKLFOW)
)
This request is to launch "missing expression"... error.
Can anyone help to understand the problem.Hello
Sorry, it does not work.
You can only use a subquery in the pivot IN clause if you say ' PIVOT * XML *...» »
You must use dynamic SQL statements to get no XML output for all values, if you can't hardcode in the query. -
"the missing expression" trying to do update form
Environment: APEX 3.1.1.00.09 on AIX 5.3
Apex. Oracle.com:
workspace: galway
application ID: 39628
Greetings,
Start with Page 3. By selecting one of the 'TRIANGLE', "BATTERSBY" or "J & B MARKETING" is displayed a list of existing contracts. Select one of the contracts (I think that each agency has only 1 contract) and "Change contract" and copy this contract ' buttons should appear. Please click on 'change this contract '. This takes you to page 2 where the information stored for this contract must appear.
Make a change to the 'object' and then click on "Apply Changes". The error message should appear.
I read several discussions regarding the process of the ARF and the error "missing expression" but can't seem to find the solution.
Bonus question: If 'J & B Marketing' are enabled, a different error is displayed when you click on the button 'change this contract '. IT has to do with the '&' in the name of the Agency and I have not found a way around that one either.
I am trying to use the Page 2 for initial intake form and its successive amendments. It is very close to work, but as we know close is not good enough.
Any suggestions are welcome. Thank you very much!
-garyGary,
I don't check your page to see if the addition of the new treatment date format definition harmed your date picker. I was just trying to get the error of "optimistic locking" DML processes go. If you find that it has something else, you may need to make adjustments. The idea is for the database session your page layout used to use the same setting nls_date_format during extraction of the line (in charge) that is used by the session of database in use during the process of dml (after submitting).
Scott
-
ORA-00936: missing expression when adding virtual column
I am having this error when you add virtual column am in database 11 g
having error
ORA-00936: lack of expression
in select superior
My sql is
Employees ALTER TABLE ADD (user name (select upper (substr (first_name, 1, 1)) | initcap (last_name) user name of employees));
http://docs.Oracle.com/CD/E11882_01/server.112/e41084/statements_3001.htm#sthref3374
Adding a column of Table virtual: example, the following statement adds a copy of the
hr.employees
table a column namedincome
, which is a combination of salary more commission. Wages and the commission areNUMBER
columns, so the database creates the virtual column as aNUMBER
same column if the data type is not specified in the statement:CREATE TABLE emp2 AS SELECT * FROM employees; ALTER TABLE emp2 ADD (income AS (salary + (salary*commission_pct)));
ALTER TABLE ADD employees (AS username (upper (substr (first_name, 1, 1)) | initcap (last_name)));
Concerning
Etbin
-
Missing expression error when cases is used as field
I tried to write an expression that calculates how many days ago a request and return a value defined by the user if the calculation falls under the criteria in the case statement. The SQL view for the query I use is shown below:
When I try to execute the query I get Message = ORA-00936: lack of expression (50 380)SELECT A.F_POSN_REQUEST_ID, A.F_REQ_ECP_STATUS, TO_CHAR(A.REQUEST_DTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_PROC_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))>60 THEN '>60' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI')) >30 AND <=60 THEN '30 - 60' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))>=15 AND <=30 THEN '15 - 30' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))<15 THEN 'Less Than 15' ELSE NULL END)END)END)END)) FROM PS_F_POSN_REQUEST A WHERE A.F_REQ_ECP_STATUS IN ('I','O','P') GROUP BY A.F_POSN_REQUEST_ID, A.F_REQ_ECP_STATUS, TO_CHAR(A.REQUEST_DTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_PROC_DT,'YYYY-MM-DD-HH24.MI.SS."000000"')
Any suggestions you could provide to help me clarify this error would be greatly appreciated.
Published by: 992737 on March 8, 2013 09:07Hi, Peter,.
Peter Gjelstrup wrote:
... ORselect something, case your_expression when > 60 then '>60' when > 30 then '>30' when > 10 then '>10' . etc. end something_else
It really works when try you it?
A CASE of Simple Expression (where you have an expression just after the CASE keyword and before the first WHEN) only check for equality. To use the inequality operators (such as >) you must use an Expression looked for CASES , such as
CASE WHEN exp > 60 THEN ... WHEN exp > 30 THEN ...
Repeat the expression exp each time.
-
The missing Expression error.
Hi friends.
I have a table called ACCESS_FORECAST.
The structure of the table is like this
I am trying to ask this but absent expression error is coming. Can anyone tell where my application is false.
ConcerningUser_Apex wrote:
SELECT CFPART_NUMBER ITEM_NUMBER,sum(CFMONTH1+CFMONTH2+CFMONTH3+CFMONTH4+CFMONTH5+CFMONTH6) QUANTITY FROM ACCESS_FORECAST where day_number = select max(day_number) from ACCESS_FORECAST GROUP BY CFPART_NUMBER ;
You will need to put brackets where condition:
where day_number = (select max(day_number) from ACCESS_FORECAST)
-
Insert the missing expression error
I am trying to insert data into sql plus, and I get this error message. I am new to this and have no idea what I'm doing wrong. Could someone please!
Here is the table that I am inserting:
Name Null? Type
----------------------------------------- -------- ----------------------------
MANUFACTURER_ID NOT NULL NUMBER
M_NAME VARCHAR2 (30)
STREET VARCHAR2 (30)
CITY VARCHAR2 (30)
VARCHAR2 (20) STATE
COUNTRY VARCHAR2 (30)
WEBSITE VARCHAR2 (50)
E-MAIL VARCHAR2 (50)
FAX VARCHAR2 (15)
I insert these values:
SQL > insert into manufacturer values (9185247, rollinsonlightsportaircraft, route2box186, bloomfield_in_47424, in, US, 'www.eurofox-use.com', '[email protected]', 8123840518);
insert into the reference values of the manufacturer (9185247, rollinsonlightsportaircraft, route2box186, bloomfield_in_47424, in, US, 'www.eurofox-use.com', '[email protected]', 8123840518)
*
ERROR on line 1:
ORA-00936: lack of expression
I worked on it forever and I'm just not getting it. Help, please!Try this:
Insert in the reference values of the manufacturer (9185247, 'rollinsonlightsportaircraft', 'route2box186', 'bloomfield_in_47424', 'In', 'US', 'www.eurofox-use.com', '[email protected]', 8123840518)
you pass the string values in this INSERT without putting the strings in single quotes. This is why you are getting the error. Values for all of the VARCHAR2 columns should be placed in single quotes.
-
Expression regular-not clear for the result
I have written 3 applications using regular expressions, but I'm not very clear on the outcome. Looking for help to understand the logic.
Here are the queries:
1 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', '([[:alpha:]]+)') ADDR FROM DUAL;
2 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', ' [[: alpha:]] +') ADDR FROM DUAL;
3 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066',(^'[[:alpha:]]+) ') ADDR FROM DUAL;
All requests above returns the same result, i.e. 'APT '.
Question: My understanding is:
a > the regular expression [[: alpha:]] + represents one or more continuous occurrences of alphabets.
b > parenthesis (i.e.) - represents the exact mactch
c > carrot i.e. ^ represents the negation, that is to say. NOT (xyz)
I can somehow convince myself that regular expressions - ' ([[: alpha:]] +)' and ' [[: alpha:]] +' in the given scenario may return the same string that is 'APT', but in the last query the regex ([[: alpha:]] + is preceded by ^, which according to my understanding should return something that isn't ONE or MORE CONTINUOUS OCCURRENCE OF ALPHABETS, but even this query is retune "APT".) Ask for help to understand this.
Thank you
Amrit Pandey
Hi, Amrit,
ba1fbc36-dd1f-46af-80EE-a9cedf91e344 wrote:
I have written 3 applications using regular expressions, but I'm not very clear on the outcome. Looking for help to understand the logic.
Here are the queries:
1 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', '([[:alpha:]]+)') ADDR FROM DUAL;
2 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066', ' [[: alpha:]] +') ADDR FROM DUAL;
3 > SELECT REGEXP_SUBSTR ('APT-101, BLDG 34, community xyz, XYZ ROAD, BANGALORE - 560066',(^'[[:alpha:]]+) ') ADDR FROM DUAL;
All requests above returns the same result, i.e. 'APT '.
Question: My understanding is:
a > the regular expression [[: alpha:]] + represents one or more continuous occurrences of alphabets.
b > parenthesis (i.e.) - represents the exact mactch
c > carrot i.e. ^ represents the negation, that is to say. NOT (xyz)
I can somehow convince myself that regular expressions - ' ([[: alpha:]] +)' and ' [[: alpha:]] +' in the given scenario may return the same string that is 'APT', but in the last query the regex ([[: alpha:]] + is preceded by ^, which according to my understanding should return something that isn't ONE or MORE CONTINUOUS OCCURRENCE OF ALPHABETS, but even this query is retune "APT".) Ask for help to understand this.
Thank you
Amrit Pandey
Be careful. Cut and paste the exact code you run.
I do not get the same results for alI these queries. I get an error message ' ORA-00936: missing expression. "for the 3rd. Maybe you wanted to have the circumflex accent (^) inside the single quotes, like this:
SELECT REGEXP_SUBSTR (' APT-101, 34 BLDG, community xyz, XYZ ROAD, BANGALORE - 560066' ")
, ('^ [[: alpha:]] +')
) AS addr
DOUBLE;
a > you're right;
[[: alpha:]] +.
refers to a group of characters 1 or more adjacent, which are all letters of the alphabet.
b > an expression can almost always be enclosed in parentheses free. In other words, almost anywhere, you can use an expression
x you can also use
(x) or
((x)) or
(((x))) and so on. Each of them the same meaning.
This has nothing to do with regular expressions.
In expressions regular, curved brackets can be used for the Backreferences, for example \1 can be used to return to exactly what corresponded to the subexpression inside the 1st pair of parentheses. You are not using anything like \1 here, so this backreferences do not apply to this question.
c > sign means negation only when it comes immediately after [.] For example
SELECT REGEXP_SUBSTR (' APT-101, 34 BLDG, community xyz, XYZ ROAD, BANGALORE - 560066' ")
", ' [^ [: alpha:]] +"
) AS addr
DOUBLE;
product
ADDR
------
-101,
in other words, the characters 1 or more consecutive which are NOT letters of the alphabet.
Outside square brackets, the circumflex accent means the beginning of the string.
-
ORA-00936: lack of expression
Hello
11.2.0.3 I have the following error:
SELECT name, value of the parameter $ v whose name as a "listener %" or "%Name%".
SQL error: ORA-00936:
00936 00000 - "missing expression.
Any idea?
Thanks for help.
Select the name, the value of v$ parameter where name like '% listener %' or NAME like '% name % ';
Please... avoid this kind of questions...
-
Need help with ORA-00936: lack of expression
11.2.0.3
to test the code to kill the blockerdesc killsessionlog Name Null? Type ----------------------------------------------------- -------- -------------- KILLTIME NOT NULL DATE USERNAME NOT NULL VARCHAR2(30) SID NOT NULL NUMBER SERIAL# NOT NULL NUMBER CTIME NOT NULL NUMBER MACHINE VARCHAR2(64) TERMINAL VARCHAR2(30) PROGRAM VARCHAR2(48) ACTION VARCHAR2(64) MODULE VARCHAR2(64)
created the blocker and blocked the sessions.SQL> create or replace procedure killblocker 2 is 3 stmt varchar2(1000); 4 cursor c1 is 5 select s1.SQL_EXEC_START+l1.ctime killtime, s1.username,s1.sid,s1.serial#,l1.ctime ,s1.machine ,s1.TERMINAL, s1.PROGRAM,s1.ACTION,s1.MODULE 6 from v$lock l1, v$session s1, v$lock l2, v$session s2 7 where s1.sid=l1.sid and s2.sid=l2.sid 8 and l1.BLOCK=1 and l2.request > 0 9 and l1.id1 = l2.id1 10 and l2.id2 = l2.id2 11 and l1.ctime >0; 12 begin 13 for i in c1 loop 14 EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION ''' || i.sid || ',' || i.serial# || ''''; 15 stmt := 'insert into killsessionlog values ('||i.killtime||','|| i.username||','||i.sid||','||i .serial#||','||i.ctime||','||i.machine||','||i.TERMINAL||','|| i.PROGRAM||','||i.ACTION||','||i.MODU LE||')' 16 ; 17 EXECUTE IMMEDIATE stmt; 18 dbms_output.put_line('SID '||i.sid ||' with serial# '||i.serial#||' was killed'); 19 END LOOP; 20 END; 21 / Procedure created.
worked the first EXECUTE IMMEDIATE for the murder of the session, but the 2nd EXECUTE IMMEDIATE for insertion failed as above. Not able to understand the problem.SQL> exec killblocker BEGIN killblocker; END; * ERROR at line 1: ORA-00936: missing expression ORA-06512: at "NN.KILLBLOCKER", line 17 ORA-06512: at line 1
TIASQL> create or replace procedure killblocker 2 is 3 stmt varchar2(1000); 4 cursor c1 is 5 select s1.SQL_EXEC_START+l1.ctime killtime, s1.username,s1.sid,s1.serial#,l1.ctime ,s1.machine ,s1.TERMINAL, s1.PROGRAM,s1.ACTION,s1.MODULE 6 from v$lock l1, v$session s1, v$lock l2, v$session s2 7 where s1.sid=l1.sid and s2.sid=l2.sid 8 and l1.BLOCK=1 and l2.request > 0 9 and l1.id1 = l2.id1 10 and l2.id2 = l2.id2 11 and l1.ctime >0; 12 begin 13 for i in c1 loop 14 EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION ''' || i.sid || ',' || i.serial# || ''''; 15 stmt := 'insert into killsessionlog values (:killtime, :username, :sid, :serial#, :ctime, :machine, :TERMINAL, :PROGRAM, :ACTION, :MODULE)' 16 ; 17 EXECUTE IMMEDIATE stmt using i.killtime, i.username, i.sid, i.serial#, i.ctime, i.machine, i.TERMINAL, i.PROGRAM, i.ACTION, i.MODULE; 18 dbms_output.put_line('SID '||i.sid ||' with serial# '||i.serial#||' was killed'); 19 END LOOP; 20 END; 21 /
Gerard
-
Hello
I need to create a nested case in an expression statement, but am having no luck. Here's what I need to evaluate:
Case ingroup.field1
When NOT NULL then
Case ingroup.field2
When NULL then 'n/a '.
Of other ingroup.field2
end
of other ingroup.field1
end
When I validate and generate and try to run the SQL outside OWB, I get the following error:
ORA-00936: missing expression.
Any ideas on what I could do wrong here?
Thank you
PaulaInstead of using the ingroup.field1 CASE... .use
CASE WHEN ingroup.field1 IS NOT NULL
THEN
CASE WHEN...It should work.
-
Hi all
Select "GRANT" | privilege | "ON" | OWNER | '.' || TABLE_NAME | of dba_tab_privs where the recipient like 'TEST % ';
Why the slightest mistake orders above Missing expression... what I have to change?
I wish that I shouldn't get mocking responses of the Senior Oracle DBA in this Forum.
Thank you all
KaiUse
Select 'GRANT'. privilege | "ON" | OWNER | '.' || Table_name |';' from dba_tab_privs where the recipient like 'TEST % ';
This will give you the output but I was thking, who is privileged to be given. That too add in this script
Select 'GRANT'. privilege | "ON" | OWNER | '.' || Table_name |' to user_name;' from dba_tab_privs where the recipient like 'TEST % ';
Anand
Published by: Anand... on December 24, 2008 14:20
-
ORA-00936: lack of Expression when using separate
Hello
I am writing a piece of code that works fine until I put the function separate on the third line, and then I get oracle error: ORA-00936: missing Expression.
Someone understands where I'm wrong?
select customer_id, *distinct* substr(old_system_id, instr(old_system_id, ':') +1, 4), substr(old_system_id, 1, instr(old_system_id,':')-1), old_system_id from ph1_ca_load inner join ph1_site_map_load on substr(old_system_id, 1, instr(old_system_id,':')-1) = site_code inner join customer on name = billing_customer ;
Select Distinct customer_id, substr(old_system_id, instr(old_system_id, ':') +1, 4), substr(old_system_id, 1, instr(old_system_id,':')-1), old_system_id from ph1_ca_load inner join ph1_site_map_load on substr(old_system_id, 1, instr(old_system_id,':')-1) = site_code inner join customer on name = billing_customer ;
-
Call the stored procedure, and bind parameters by name
Hello
I use the Oracle ODBC 12 c driver to pass values from one Interface to our database Oracle 11.2. The Interface software collects data from modbus protocoll and calls a stored procedure. Right now my syntax to call the stored procedure looks like this:
CALL procedure-name ('STRING', 'Timestamp as String', numValue1);
It works very well. Now, I have to add a default setting to my procedure. To stay flexible to make other changes, I want to call the procedure and bind the parameters by name. Release 10.2.0.1.0 ISC ODBC Notes:
Added support for the named parameter, binding the parameters by name. ODBC Oracle driver now allows the application to specify the parameters of a stored procedure by name, in the procedure call. Named parameters are to be used in calls to stored procedures and should not be used in other SQL statements.
So, it shouldn't be a problem to use named notation, but how do I do this in ODBC? I tried like this, but oracle returns an ora-00936 error of missing expression:
call procedure-name (paramName1 = > 'STRING',= paramName2 > 'Timestamp as String',paramName3 = > numValue1).
Thank you for your help.
Finally, I was able to find the error. The syntax of the statement was very good. The problem was caused by another declaration that I edited before and the error has not attracted Attention immediately.
Thanks for reading and looking for an answer.
Maybe you are looking for
-
Firefox has several options of the printer, but not the one I need to use at home. I just need to know how to add a printer from the drop-down list. Thank you!
-
Need to install order for Portege R830-10 q WXP
SOMEONE HAS THE ORDER OF INSTALLATION OF THE DRIVERS / SOFTWARE FOR WINDOWS XP FOR TOSHIBA PORTEGE R830-10 Q PLEASE?
-
Satellite A200 - need ACPI Driver for Windows XP Home edition?
Hello! I have a Satellite A200-13U Notebook and installed WinXP top.I found all the drivers, but the ACPI driver is missing and I can't find it. Can someone help me please?
-
error in download of updates 8024400
0x8024400A error number
-
How can I remove "ask for authentic" microsoft in my computer software? It shows a message to the right down corner of my desk that says "you may be victim of software counterfeiting. " This copy of windows does not pass genuine windows validation. »