ORA-00906: missing left parenthesis in replace [closed] - sql

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
Following SQL
select replace (IBSECM.IBSECM582CTEXT1SHRT, 'Curtina', 'Curtine') from table IBSECM;
is giving following error:
ERROR at line 1:
ORA-00906: missing left parenthesis
What am I missing?
I am using an Oracle DB.

Simply remove table keyword:
select replace (IBSECM.IBSECM582CTEXT1SHRT, 'Curtina', 'Curtine') from IBSECM;

Related

Syntax error (missing operator) in query expression ‘[Type]=5 And Left([Name],1)<>"~" OORDER BY [Name]’ [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I have to create a list box control that contains all of the queries except for the system queries. Recall that system query names begin with the ~ character.
When I try to write SQL code in the row source (in the property sheet) for my frmQueries form I keep getting an error saying:
Syntax error (missing operator) in query expression:'[Type]=5 And Left([Name],1)<>"~" OORDER BY [Name]'
The code I entered is:
SELECT [Name] FROM MYSysObjects
WHERE [Type]=5 And Left([Name],1)<>"~"
OORDER BY [Name];
I am not sure why I am getting this error or how I can fix it.
OORDER should be ORDER, MYSysObjects should (presumably) be MSysObjects, and you can also replace Left([Name],1)<>"~" with [Name] not like "~*" (assuming MS Access instead of SQL Server).

How to fix SQL Server and cast and replace query? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I was past a request to replace in a table called BODYCONTENT for the BODY column and references to old server with new server.
The vendor sent the following SQL, but it failed. Any ideas on this?
update BODYCONTENT
set BODY = replace(CAST(BODY AS nvarchar(MAX), 'https://oldserver.com', 'https://newserver.com');
Error:
Msg 102, Level 15, State 1, Line 23
Incorrect syntax near ','
You are missing a right parenthesis in the CAST before the comma
update BODYCONTENT
SET BODY = replace(CAST(BODY AS nvarchar(MAX)), 'https://oldserver.com', 'https://newserver.com');

Oacle SQL : command not executing properly [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
I am executing following query in oracle SQL developer
SELECT PROPERTYNO FROM VIEWING WHERE COMMENTS IS NOT NULL
UNION (SELECT PROPERTYNO FROM PROPERTYFORRENT MINUS SELECT PROPERTYNO FROM VIEWING);
but I am getting below error, though I feel my query is correct. can anyone suggest me what's wrong in my query?
SELECT PROPERTYNO FROM VIEWING WHERE COMMENTS IS NOT NULL
UNION (SELECT PROPERTYNO FROM PROPERTYFORRENT MINUS SELECT PROPERTYNO FROM VIEWING)
Error report -
ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:

How to use sp_depends for other database [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Using SQL Server 2010
For updating the tables i am using following line
update database1_ab..table1
For sp_depends i am getting error as "Incorrect syntax near '.'"
sp_depends database1_ab..table1
How to use sp_depends for referring other database tables in current database
regardless, you need to put it in single quotes... ie
sp_depends 'database1_ab..table1'
or
sp_depends '[database1_ab]..[table1]'
You can call all the sp_ -procedures also in different database like this:
database1_ab..sp_depends table1

SQL Fiddle - date format not recognized [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 9 years ago.
Improve this question
So as someone advised me yesterday I'm using SQL Fiddle since it's an easy way to test database queries and SQL programming in general but I'm getting this error:
Schema Creation Failed: ORA-01821: date format not recognized
This happens in the insert line. This usually works in Oracle and I selected in the combobox on top of the page Oracle 11g. So what's the problem?
create table Reparacoes(
numero_r int,
matricula char(8),
dataEntrada date,
constraint pk_carro primary key(numero_R),
constraint check_matricula check (regexp_like(matricula,'[[:number:]]{2}-[[:alpha:]]{2}-[[:number:]]{2}')));
insert into Reparacoes values (1,'S2-SS-12',to_date('yyyy-mm-dd','2013-11-10'));
By my own stupidity I was using the to_date wrongly. It's supposed to be like this:
to_date('2013-11-10','yyyy-mm-dd'));
and not like this:
to_date('yyyy-mm-dd','2013-11-10'));