Delete Statement Doesn't Work - SQL Command Not Properly Ended
Aug 28, 2007
The following script doesnt work.
DELETE
FROM PSPROJECTITEM I
WHERE I.PROJECTNAME = 'TEMP1'
and (I.OBJECTTYPE between 79 and 84
or (I.OBJECTTYPE = 58
and I.OBJECTID1 = 104
[code]...
It gives the following error:
Error at Command Line:12 Column:6
Error report:
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
View 7 Replies
ADVERTISEMENT
Jan 13, 2013
am learning the Oracle PL/SQL language using CBT Nuggets tutorials and practicing what I learn. I seem to be getting confused with the ROUND function...For example, what am I doing wrong in this statement:
select avg(salary) from employees,
ROUND (avg(salary) , 2;
Basically I am trying to round the result to two decimal places but get the error ORA - 00933 - SQL command not properly ended?
View 6 Replies
View Related
Mar 15, 2013
i have a problem with a syntax in sql navigator. everytime a run this sql command, this message appears:
ORA-00933: SQL command not properly ended.
INSERT INTO table1
(year, id, Date, categ)
VALUES (2013, id, '15-mar-2013', 2)
select year, id, date, categ from table1 where id=5000 and year=2013;
also
INSERT INTO table1
(year, id, Date, categ)
VALUES (2013, 5000, '15-mar-2013', 2)
select year, id, date, categ from table1 where id=5000 and year=2013;
View 3 Replies
View Related
Jan 13, 2011
I created a table named dept2 which is a duplicate of the dept table in scott schema.
create table dept2 as select * from dept;
after that I altered it woth the following statements :
alter table dept2 add ddate date;
alter table dept2 modify deptno unique;
all operations were successful , now when I execute the following ddl statements :
alter table dept2
add constraint xx unique (loc,dname)
add constraint yy check (mod (deptno,10) =0) disable
modify ddate default sysdate
modify deptno number (5)
drop unique (deptno)
I get the error : SQL Error: ORA-00933: SQL command not properly ended
when I remove the statement of drop unique (deptno) it works
View 13 Replies
View Related
Oct 23, 2012
INSERT INTO Table (NID, NType) SELECT DTreeNotifySequence.NextVal, 1 FROM Dee WHERE ID =354344 commit;
I get the following error:
ORA-00933: SQL command not properly ended
I tried it in several ways...are more semicolons needed?
View 4 Replies
View Related
Aug 9, 2010
My requirement with one table which contains 20 columns. Now I want to convert 18 column into rows. I tried with the following query but its throwing sql error is given below.
select * from tmpl_pop_age_range_col_lvl
UNPIVOT
(
quantity FOR product IN (COUNT_0_TO_4 as 'a', COUNT_5_TO_9 as 'b', COUNT_10_TO_14 as 'c',
COUNT_15_TO_19 as 'd',
COUNT_20_TO_24 as 'e',
COUNT_25_TO_29 as 'f',
[code].....
ERROR at line 4: ORA-00933: SQL command not properly ended
View 8 Replies
View Related
Jan 18, 2012
After creating this procedure...we r not able to execute it...
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure dyn_pro1
2 (tablename varchar2,colname varchar2, prodid number) is
3 cmd varchar2(100);
4 begin
5 cmd := 'delete ' || tablename || ' where'|| colname|| '=' ||prodid;
6 execute immediate cmd ;--using College_id;
7* end;
SQL> /
Procedure created.
SQL> exec dyn_pro1('stu_4','COLLEGE_ID',200);
BEGIN dyn_pro1('stu_4','COLLEGE_ID',200); END;
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
ORA-06512: at "APPS.DYN_PRO1", line 6
ORA-06512: at line 1
View 8 Replies
View Related
Mar 7, 2013
The multiple row insert is not working
CREATE TABLE example (
example_id INT NOT NULL,
name VARCHAR( 50 ) NOT NULL,
value VARCHAR( 50 ) NOT NULL,
OTHER_VALUE VARCHAR( 50 ) NOT NULL
);
For the below query its showing error .
INSERT INTO example
VALUES
(100, 'Name 1', 'Value 1', 'Other 1'),
(101, 'Name 2', 'Value 2', 'Other 2'),
(102, 'Name 3', 'Value 3', 'Other 3'),
(103, 'Name 4', 'Value 4', 'Other 4');
the error message is.
Error starting at line 1 in command:
INSERT INTO example
VALUES
(100, 'Name 1', 'Value 1', 'Other 1'),
(101, 'Name 2', 'Value 2', 'Other 2'),
(102, 'Name 3', 'Value 3', 'Other 3'),
(103, 'Name 4', 'Value 4', 'Other 4')
Error at Command Line:3 Column:39
Error report:
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
View 8 Replies
View Related
Mar 7, 2013
SQL> select lo.location_id,te.employee_id
2 from LOCATIONS AS lo,
3 TEST AS te
4 where te.employee_id = 169;
ERROR at line 2:
ORA-00933: SQL command not properly ended
View 2 Replies
View Related
Jan 18, 2013
I'm unable to get the below update SQL to run in Oracle, it's giving me th below error
ORA-00933: SQL command not properly ended.
UPDATE
PDR.PH_Family_Match_by_Chassis a
SET a.Launched = 'Y'
INNER JOIN
PDR.domCHASSIS
ON
a.chassis_id = PDR.domCHASSIS.chassis_id
[code]....
View 8 Replies
View Related
Oct 16, 2012
What I am trying to do is get my report to list every room in the table even if there is nothing scheduled in the room for the selected date. I add a command to the report to force the left outer join but I keep running into errors. This is how I have it worded:
SELECT
"ROOM"."ROOM_ID",
"PATIENT_CARE_EVENT"."OR_NUM"
FROM
"ROOM"."ROOM" LEFT OUTER JOIN "PATIENT_CARE_EVENT"."PATIENT_CARE_EVENT"
ON "PATIENT_CARE_EVENT"."OR_NUM"="ROOM"."ROOM_ID" AND "PATIENT_CARE_EVENT"."PROCEDURE_DATE_DT" IN {?Start Date} TO {?End Date}
Someone else suggested that I change the IN/TO wording in the last line to BETWEEN/AND. When I do that it gives me an error stating that the table or view does not exist.
View 18 Replies
View Related
Jul 28, 2010
I was working on an applications program It is written in PL/SQL . It is running on an oracle 8i database It was not written by me but now I am responsible of it. I made some changes to database tables for this years regulations. Everything was working fine but yesterday I have recompiled two of the packages for some regulations and one of the procedures was stopped working.
It is called 'sayfa2'. Packages names are 'aday1' and 'aday2'. They both have a procedure called sayfa2 and both of them don't work now. They gave me no compilation errors. All I did is I have copied the original code from toad and compiled it at sqlplus I have changed nothing except some texts inside html tags. I couldn't guess what is wrong.
It actually converts to html pages. All procedures are working fine except sayfa2. aday1 is for to fill information and submit but when I click submit button it gives an error:
The requested URL /pls/kon/aday1.sayfa1 was not found on this server. Oracle HTTP Server Powered by Apache/1.3.19 Server at ...
There is also a problem with Turkish characters they don't appear correctly.
Below is sayfa2 and I also added aday1 package could you have a look at it .
PROCEDURE sayfa2(stuid VARCHAR2,tckimlik VARCHAR2, ad VARCHAR2, ad2 VARCHAR2, soyad VARCHAR2,
sex VARCHAR2, mdurum VARCHAR2, bad VARCHAR2, aad VARCHAR2,
dyer VARCHAR2, dgun VARCHAR2, day VARCHAR2, dyil VARCHAR2,
nil VARCHAR2, nilce VARCHAR2, nkoy VARCHAR2, cilt VARCHAR2,
asira VARCHAR2, sira VARCHAR2, asuba VARCHAR2, kang VARCHAR2, agorev VARCHAR2,
[code].......
View 10 Replies
View Related
May 7, 2013
I have a master block (MASTER with Item 1 and 2) and details block (DETAILS). If the user enters the query mode and queries the Master block, the Details get populated automatically. So far so good.
Now I attached an LOV to Item 1 in the Master Block and the requirement is that when the user picks an item in the LOV, the details should automatically populate. Because of "restricted procedures" (GO_BLOCK) in triggers, I put a Button in a Control Data Block and the code in the WHEN-BUTTON-PRESSED trigger is as follows :
GO_BLOCK('DETAILS');
EXECUTE_QUERY;
It does go to the Details block and also displays all the details. However, when I try to update, insert or delete data, it fails with "Insufficient Privileges". So when I looked at the query being executed (Cntrl + Shift + E), I can see that it is trying to perform these operations on the Master block. (ie for some reason the scope is still in the Master and not Details even after Go_Block(DETAILS) has been executed.
I then tried to use Go_Item('DETAILS.Dept_No') to see if that would work. That too did not work. I tried to set the Navigation Style on these Data Blocks to "Change Data Block". Still no success.
View 3 Replies
View Related
Jan 11, 2011
It shows me error when i create a table with column name as UID.
Is UID a inbuilt function or anything else?
View 2 Replies
View Related
Jul 29, 2010
I want to be able to use "localhost" in my tnsnames.ora and listener.ora files but for some reason its not working.
just concentrating on the listener, when I have the following in my listener.ora the database doesnt register with the listener:
########################################
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))))
########################################
This is even after using the "alter system register" command. I'm checking whether my database is registering using "lsnrctl services".
With the following in listener.ora all is fine:
########################################
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.152)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))))
########################################
So why wont it work with localhost?! I'm running Oracle 11G on XP Pro.
View 7 Replies
View Related
Mar 8, 2011
im now doin' my currently program, actually they requesting for an update. I added birth date column in the module,they asked to the request to put a validation on date, such as:
a. under age
b. :txt_ph_birthdate > SYSDATE
c. if :txt_plan_type = 212 then
17 yrs, 5 mos and 29 days and 40 yrs, 5 mos and 29 day - as validation
d. if :txt_plan_type = 214 then
40 yrs and 6 mos and 55 yrs, 5 mos and 29 days - as validation
e. if :txt_plan_type = 215 then
17 yrs, 5 mos and 29 days and above - as validation
they also instructed me to put the validations in birth date after the column of birthdate, which is the :txt_plan_type(list_item) and i put it in TRIGGER (when-validate-item)after i did the codes and compile it., theres no message for error but i think its not working..it working. i already updates also the insert and the other trigger and procedure, i just add the plan type on it.
i havent edit the save button because the as i read the codes the it just call the procedure that i edit.when i run the program and after i encode the data..and when i press the save button, nothing happens or any confirmation.in addition, why is it that my validation on age doesnt work?
heres the
declare
n_months_between NUMBER;
d_same_day_occur DATE;
n_years NUMBER;
n_months NUMBER;
[code]...
View 8 Replies
View Related
Jan 27, 2011
I'm trying to make a div that is hidden at the top of a page until you click support, and then it slides out. I've got this working fine in FF, but in IE it's really choppy.
View -1 Replies
View Related
Mar 28, 2010
I've installed without problems Oracle 8.0.5 on WS 2003. After installation I've created 8 databases, with the utility Database Configuration Assistant (dbassist, executed by launch80.exe).
After that, the DBAssist doesn't run anymore.
I've tried EVERYTHING. And I have no success, Im stuck. And I need to create several databases.
View 1 Replies
View Related
Oct 10, 2012
We have troubles with import of transportable tablespace, when i try to import it with system the import is done currectly, when i try to use another user we receive this message :
impdp bmcese/***** directory=TTS_DIR dumpfile=RMCCO_RMC_ANA_STS_ABB_CO121001.dmp TRANSPORT_DATAFILES=/data/TTS/RMCCO_RMC_ANA_STS_ABB_CO121001.dbf logfile=tts_imp_proc.log
ORA-31626: il job non esiste
ORA-31633: impossibile creare la tabella principale "BMCESE.SYS_IMPORT_TRANSPORTABLE_05"
ORA-06512: a "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: a "SYS.KUPV$FT", line 1020
ORA-00959: tablespace 'RMCCO_RMC_UTZ_PP080531' inesistente
this happens only on development server and it work into test server, so i don't think that the problem is in grants(i controlled that are the same and i have tried with DBA grant too and we received the error).Another strange thing is that tablespace 'RMCCO_RMC_UTZ_PP080531' is not included into the dump that i try to import and it doesn't exist in the database.
View 4 Replies
View Related
Sep 10, 2012
Why the TRUNCATE command would not work in PL/SQL block ? A work arround would be dynamic SQL, but I'm avoiding it...
begin
truncate table test;
end;
View 7 Replies
View Related
Jun 22, 2012
I have a website I am working on a database for, and to insert new data into the table is not a problem, even to output the table isn't an issue.
But a delete query won't work and it doesn't return any errors or echo commands that I put in the steps of the logic.
View 11 Replies
View Related
Jan 12, 2011
If i inserted the values in table it gets inserting very few rows only.I dont know y it is?
View 15 Replies
View Related
Dec 29, 2011
How do I write this MSSQL statement so it works in Oracle?
update b1
set b1.b1_app_status = r3.application_status
from conv_app_status_update a, statyp r3, b1perm b1
where a.spc = r3.serv_code
and a.task_des = r3.r3_act_type_des
and a.task_status =r3.r3_act_stat_des
and a.process_code = r3.r3_process_code
and r3.application_status is not null
and a.spc = b1.serv_code
and a.id1 = b1.id1
and a.id2 = b1.id2
and a.id3 = b1.id3
View 1 Replies
View Related
Jan 11, 2012
I am using JDBC to run a few queries from my Java program (multi-threaded one).I am facing an issue where a select statement is blocking a delete statement. From the java code point of view, there are 2 different threads accessing the same tables (whith different DB connection objects).
When the block occurs (which i was able to find out from the java thread dump that there is a lock on oracle), the below is the output:
SQL> SELECT TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS')
2 || ' User '||s1.username || '@' || s1.machine
3 || ' ( SID= ' || s1.sid || ' ) with the statement: ' || sqlt2.sql_text
||' is blocking the SQL statement on '|| s2.username || '@'
4 5 || s2.machine || ' ( SID=' || s2.sid || ' ) blocked SQL -> '
6 ||sqlt1.sql_text AS blocking_status FROM v$lock l1, v$session s1, v$lock l2 ,
7 v$session s2,v$sql sqlt1, v$sql sqlt2
8 WHERE s1.sid =l1.sid
9 AND s2.sid =l2.sid AND sqlt1.sql_id= s2.sql_id
AND sqlt2.sql_id= s1.prev_sql_id AND l1.BLOCK =1
10 AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2;
[code]...
From the above it can be seen that a select statement is blocking a delete. Unless the select is select for Update, it should not block other statements is not it ?
View 10 Replies
View Related
Mar 12, 2013
I've created a small script witch delete the obsolete and expired backups of RMAN.
The problem is: the "delete obsolete" and the "delete expired backup" command needs a confirmation with YES. I don't need to confirm the command and he deletes the backups directly?
Here is my little script:
#!/bin/ksh
export ORACLE_SID=dbtest2
export ORACLE_HOME=/home/oracle/srv/ora/product/11.2.0/dbtest_2
export ORACLE_BIN=/home/oracle/srv/ora/product/11.2.0/dbtest_2/bin
alias RMAN=$ORACLE_BIN/rman
[code].....
View 9 Replies
View Related
Mar 17, 2012
I have following query in Dataguard ..
If I want to take Rman archive log backup with delete input command , how the archive logs will be copied to standby database
For eg
I am taking archive backup as
RMAN>backup archivelog all delete input;
here consider few archives are not copied to standby database (due to nw issue) then how standby will receives these missing archives as those are deleted by rman backup at primary side.
I am not getting any document related to above query.
View 7 Replies
View Related
Nov 30, 2012
I am trying to delete the backupset using Delete Obsolete command, but i am unable to get the success. As per the oracle Doc after completion of Retention Period oracle automatically deletes the backupset. I have set the retention period of 8 days.
View 7 Replies
View Related
Mar 14, 2011
I am trying to run following sql query,but it is throwing following error.
SQL> delete from b$gc_count_temp a INNER JOIN COMPLEMENTS ON b$gc_count_temp.CON
NECTION_ID_TEMP=COMPLEMENTS.feature_conn_id
2 WHERE a.current_designation is null and a.current_low is null and a.current
_high is null;
delete from b$gc_count_temp a INNER JOIN COMPLEMENTS ON b$gc_count_temp.CONNECTI
ON_ID_TEMP=COMPLEMENTS.feature_conn_id
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
View 4 Replies
View Related
Sep 6, 2012
I've small doubt regarding the subqueries in delete statements. observe the below statements with their results.
SQL> alter table emp3 rename column deptno to deptid;
Table altered.
SQL> select deptid from dept;
select deptid from dept
*
ERROR at line 1:
ORA-00904: "DEPTID": invalid identifier
[code]...
but when you use same subquery in update or select stmt it throws 'invalid identifier' or similar error.Why same does not happen with delete stmt ?
View 6 Replies
View Related
Jan 23, 2009
I am getting ORA-00933 after running below mentioned delete statement;
DELETE FROM REPOSITORY.MEDIASEGMENT MS
INNER JOIN REPOSITORY.ROUTINGEVENT RE ON TRIM(MS.Segment_Key) = TRIM(RE.uuid)
INNER JOIN REPOSITORY.TEMPCONTACT TC ON TRIM(RE.Contact_Key) = TRIM(TC.vduid)
WHERE TC.CREATETIME BETWEEN (TO_DATE('04/24/2008 00:00:00','MM/DD/YYYY, HH24:MI:SS')) AND
(TO_DATE('04/30/2008 23:59:00','MM/DD/YYYY, HH24:MI:SS'))
View 2 Replies
View Related