Create table error with Apache Derby database: Syntax error: Encountered "AUTO_INCREMENT" - sql

I've created a datasource in the Coldfusion Administrator interface for an embedded Apache Derby database. The queries, such as select, work fine. However, I can't find a way to create a new table in my database. I couldn't find interface for that, such as in phpmyAdmin, either. that. I've tried to create it by using a SQL query, but then builder complains about syntax errors:
Error Executing Database Query.
Syntax error: Encountered "AUTO_INCREMENT" at line 1, column 38
Screen shots:

Related

Trouble querying a hive database through dbeaver

I am having trouble querying a hive database with dbeaver, using trino. I've connected it using the same settings as the admin - and he showed me a few examples of it working on his computer through a screenshare meeting. I have used sql before and want to get to know the databases right now - I am trying select * from database.schema.table_name (real names not used) - and getting the following error:
SQL Error [1]: [SQLITE_ERROR] SQL error or missing database (near ".": syntax error)

Unable to access Snowflake Table

I have access to a snowflake table on the snowflake ui, but when I try to access the same table in r through the obdc query, I'm getting an error saying that I'm not authorized to access the table.
The weird thing is that I'm able to access the table in another query in r.
Any idea how to debug?
Error in new_result(connection#ptr, statement, immediate) :
nanodbc/nanodbc.cpp:1374: 42S02: SQL compilation error:
Object 'CIQSECURITY' does not exist or not authorized.

VS2019 SQL Project incorrect syntax trying to create Security Policy

Security Policies in Azure SQL has been around for quite a few years now, and trying to create a security policy in my sql project (VS2019) is returning incorrect syntax near SECURITY.
Does it look like I'm doing anything obvious wrong?
Azure SQL Targeted:
but still incorrect syntax near SECURITY
What could I be doing wrong?
I figured this out for anyone else that runs into this. I had to set the schema DSP ruleset to V12 in the .sqlproj file
Change this line:
<DSP>Microsoft.Data.Tools.Schema.Sql.SqlAzureDatabaseSchemaProvider</DSP>
to
<DSP>Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider</DSP>
It seems there is no way in the vs2019 gui yet to specify v12
I tested in Visual Studio 2017 and 2019, have the same error.
When I copy the SQL statement to the new query editor before execute it, the Error List will show the "Incorrect syntax" error:
But we still can run the query, there isn't any syntax error in query results:
Query executed successfully:
I think we can ignore the error in Error List, just reference the query execute result.
Hope this helps.

connecting to mysql 8.x from pentaho data-integration(kettle)

I have table input and insert/update component on my transformation. when i put all parameters for mysql8 and click on test, it was successful and able to connect. But when i browse table I am getting following error
**Unable to retrieve database information because of an error
Error getting views from schema [null]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HAVING TABLE_TYPE IN ('VIEW',null,null,null,null) ORDER BY TABLE_TYPE, TABLE_SCH' at line 1
I have latest mysql8.x jar in lib directory
this is not related with pentaho kettle, you have an error in your query

Syntax error when trying to change schema in SQL Server database

I am trying to rename the schema for a dozen tables in an old database on SQL Server 2005. I'm using SQL Server Management Studio Express version 9.0. Based on detailed advice found here, as well as several forums on other sites, I've been trying this straightforward command:
ALTER SCHEMA newschemaname TRANSFER oldschemaname.table1
I consistently get this error:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'SCHEMA'
It's the same whether I run it directly in the "New Query" window or build it into a stored procedure.
The database's owner is "SA," dating back to when my web host (the physical server's owner) first set up this database years ago. This makes me think there might be a permissions issue, or some obscure mismatch between the owner name and the login I'm using. But if that was true, I'd expect the error to tell me I don't have rights to execute that command.
Is there some obvious syntax error I'm missing, or do I need to delve deeper into the ownership and permissions to get the rights to fix this?
New Schema name needs to be in brackets otherwise it will fail
Example statement:
ALTER SCHEMA [NewSchemaName] TRANSFER dbo.Tracking