MDSYS.SPATIAL_INDEX syntax error - database

CREATE INDEX test_index ON cola_markets(shape)
INDEXTYPE IS MDSYS.SPATIAL_INDEX;
I am creating an index on Oracle Spatial column, following the guidelines here at http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objindex.htm#i78196
However, SQL developer keeps complaining about the following error.

That is definitely the right syntax. I confirm that there is no typing mistake by running it on my database.
On the possibility that this is some oddity due to SQL Developer, can you also try and run the command with plain sqlplus ? What do you get ?

Related

IntelliJ is unable to query SQL Server database and returns an empty error message

I've run into an issue with IntelliJ IDEA 2020.1.2, build #IU-201.7846.76 that I have no idea how to begin troubleshooting.
My SQL Server database is up and running just fine (our client applications and SQL Server Management Suite have no issues), but when I try to query it from within IntelliJ, I get no results and an error message that consists only of a period (.):
The query itself does not matter as even this most basic of queries has the exact same result:
SELECT * FROM table_name;
Obviously, I am having a hard time finding a solution for something so vague by searching here or the web.
This is new behavior as of today; yesterday the queries were working just fine.
What does this error "message" mean and how can I determine the cause?
There seems to be a known issue in this version of the JetBrains Runtime, per https://youtrack.jetbrains.com/issue/DBE-10839.
Updating the driver, as suggested, did not resolve the issue for me. Instead, rolling back to IntelliJ IDEA 2020.1 worked out.

How to create mysql function in aws?

I tried creating a mysql stored procedures, it was okay. I tried to create a function of mysql stored function but I am having this error.
Did some research but was afraid to try because there were a lot of solution. I don't know which one is real.
I tried also checking the privilege in phpmyadmin side. Not working.
I also tried updating log_bin_trust_function_creators to 1 and caused an error. below is the image attached with error.
This is the error when I tried creating a function in aws server via phpmyadmin:
As the error message indicates, you need to set log_bin_trust_function_creators to 1 in the RDS parameter group.
It is not "less safe" in a meaningful sense in RDS.
https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_log_bin_trust_function_creators

PGAdmin: Not connected to the server or the connection to the server has been closed

i got this problem with postgreSQL, when i do a simple query of anything (CRUD), sometimes it works and almost always shows this message:
Not connected to the server or the connection to the server has been closed.
I don't know how to solve it and it started to irritate me, anyone know how to fix it?
UPDATE 1
I have been searching and it seems the pgadmin4 the problem (it seems because it's not 100% developed yet), i have been using pgadmin3 and that error doesn't show up.
solution is:
select the database where you lost the connection.
then on the right hand side select SQL
For example in the picture (shopdb) is the db where I lost the connection to.
After that PgAdmin will ask you if you would like to reconnect to this database...
click ok
you will notice a message retreiving data from the server
The reason this happened for me was a syntax error in the query. Check your syntax and try again, maybe this suffices
This issue has been fixed.
Upgrade to pgAdmin4 version 2.0. https://www.pgadmin.org/download/
I have similiar problem before, im using postgre 9.6.1-1
I can do select without condition (ex: select * from foodtable) and i can do insert too.. But if i do select or edit or delete using a condition (ex: select * from foodtable where taste='sweet') the output is like your
Not connected to the server or the connection to the server has been closed.
I try reinstall (After uninstall delete all leftover data) and delete C:\Users\yourUserName\AppData\Roaming\pgAdmin (delete all data inside pgAdmin Folder)
And its works
Update-> Your table name and field name must lowercase
Can you run & provide output of these sql queries from pgAdmin4?
1) SHOW SERVER_ENCODING;
2) SHOW CLIENT_ENCODING;
And what is the encoding set for your current database connection on which you are trying to run query (Right click on your database, click on Properties > Definition Tab > Check Encoding, Collation & Character type) ?
I'm suspecting you are facing issues due to encoding.
Change the versiĆ³n of pgAdmin, use pgAdmin 3, its a problem frequently between Windows 10 and pgAdmin4.
just change the column name and run the query , it worked for me.
my column name was timestamp, it conflicted with datatype so i changed timestamp by _timestamp
Juuuuust in case someone googled this post like i did.
If you have JSON column AND you want to see ANY result in pgAdmin, cast JSON into VARCHAR like
SELECT id, metadata::VARCHAR FROM data_table;
It doesn't matter if content is NULL or not, JSON doesn't work. Maybe there are other types or values that can't be parsed by pgAdmin as well.
Note: you can still insert values and recieve them after cast, so the problem is on JS side (put one more coin into your "Hate JS" jar).
We have just experienced this on a standalone windows machine.
After reinstalling things and looking everywhere (logs, running psql in shell - all was good) then we found out that it was an older firefox that was the culprit.
So - please ensure that your browser is up to date :-)
I solved this. I pressed F7 or Explain in drop-down list near the Execute button. Then I saw where exactly the trouble was. pgAdmin4 didn`t like the name of my column. Then I went to problem column and renamed it.
I have same problem
but i can create DB and table successful
and my version is:
window10 pro x64
9.5 (X86)
pgAdmin4
after i change to 9.4 (X86)+ pgAdmin3 is no more error.. and the table i create by 9.5 can be use(insert data) in pgAdmin3
I am using the pgadmin version 4.6 which is the current release as for now.
I could only solve the problem by running query inside
DO $$ ... BEGIN ... END $$;
block.
In case anyone still looking for an answer like me.
I was getting this error when running a long series of queries in a transaction. Then when I ran them separately, it didn't loose the connection. Still no idea why it actually happens...
My operating system is windows 10.
pgAdmin Version - 4.5
I was getting this error when executing scripts, downgrading to pgAdmin version 4.3 fixed the issue for me.

I have a view that runs fine when executed, but when I try to open it in design mode, it throws a parsing error

I don't have enough reputation to post a screen capture, so I'll do my best to explain what's happening.
As I said in the title, it is a view that executes just fine when you run it normally. When I try to open it using design view, it throws this error:
i - The following errors were encountered while parsing the contents of the > SQL pane:
Error in WHERE clause near '('. Unable to parse query text.
There is nothing wrong with the WHERE clause, or my syntax considering it runs fine. My concern is that there are extended properties that attempt to define how it will look in design mode. I am completely unfamiliar with this concept.
Is this a bug, or a problem with my SQL? I have changed the names of the tables for security reasons
WHERE (dbo.tblxx.bolObsolete = 'False') AND (dbo.tblxy.bolObsolete = 'False')
There is no solution to the problem except using T-SQL in management studio. This is a bug, or as Microsoft calls it by design.
The view designer has more issues then just BIt datatypes. There are several valid SQL syntaxes that are not supported by designer. That's the reason I never use the designer but just write my create/alter statements in management studio.

How can I fix "SQL03042: The ALL clause is not supported"?

I have just recently added our db schema into a VSTSDB project and one of the sp's is coming up with a strange error on the line:
revoke all from StatsReports
Now I've taken a look at the Sql docs for the "revoke" command and according to that it is valid sql. Also searching for the error number or text brings up nothing!
Anyone have any ideas?
It is valid TSQL, but the error message is - I assume - coming from VSTSDB, not from SQL Server. Running your query directly against a SQL 2008 database gives the following message:
The ALL permission is deprecated and maintained only for compatibility. It DOES NOT imply ALL permissions defined on the entity.
My guess is that VSTSDB shows an error on this syntax in order to 'remind' you to update your code. The deprecation is documented under the main page for the REVOKE command.

Resources