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:
Related
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).
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');
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;
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 8 years ago.
Improve this question
I'm trying to run an SQL SELECT statement which is running correctly in SQL Server Management Studio, but I keep receiving the error while trying to run the below code in Visual Basic/Studio:
In correct syntax near the word 'ON'
Code:
com = New SqlCommand("SELECT Member_Details.mMember_ID AS 'Unique ID', Member_Details.mFirst_Name + Member_Details.mLast_Name AS 'Name', CONVERT(varchar(10),Member_Details.mDoB,103) AS 'Date of Birth', Member_Details.mGender AS 'Gender', Rep_Group.rRep_Group_Name AS 'Rep Group'" & _
"FROM Member_Details" & _
"Join(Rep_Group) ON Member_Details.mRep_Group=Rep_Group.rRep_Group_ID", con)
The error message:
A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Additional information: Incorrect syntax near the keyword 'ON'.
The SQL Statement does work without the Join statement, so I think I'm just formatting it wrong in Visual Studio.
Replace Join(Rep_Group) with Join Rep_Group in your code. JOIN is not a function :)
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'));