Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

MsSQL: unable to run queries on databases with names that contain - #409

Closed
n-riesco opened this issue Apr 3, 2018 · 5 comments
Closed
Assignees
Labels

Comments

@n-riesco
Copy link
Contributor

n-riesco commented Apr 3, 2018

See https://community.plot.ly/t/error-once-i-am-connected-to-my-azure-sql-database/6799/12?u=n-riesco

@n-riesco n-riesco added the bug label Apr 3, 2018
@ghost
Copy link

ghost commented Jun 22, 2018

I face the same issue described in the link, with the 'Run' button not responding to even the simplest of queries. An error message is displayed all the time:

ERROR: Incorrect syntax near '.011'.

This seems to happen when the table name contains a point.

@n-riesco
Copy link
Contributor Author

@pabucur A few questions:

  1. does your database name contain any -?
  2. can you see the database tree on the left hand side in the Query panel?

If the answer to 1) is no, and the answer to 2) is yes, please, could you share a simple query that reproduces the error?

@n-riesco n-riesco self-assigned this Jun 22, 2018
@ghost
Copy link

ghost commented Jun 22, 2018

@n-riesco Thank you for the quick reply! After rechecking, this seems to happen when a table does not hav e the typical 'dbo' schema, but an own one (thus the point which I before mistook as being part of the table name, which it wasn't).
An example, where the database is called user, then the schema corresponds to a certain group m1922, then the table name begins with a 0 : [user].[m1922].[011m_pc].

The database name does thus not contain any -, and I see the tree, but not sorted by the schema. The schemas are all grouped together, and I see only the table names. There seems to be a problem with them beginning with a number?

Query: SELECT TOP 10 * FROM [user].[m1922].[011m_pc]

The Run button does not respond and before running any query I already see the Error message:

ERROR: Incorrect syntax near '.011'.

n-riesco added a commit to n-riesco/plotly-database-connector that referenced this issue Jun 22, 2018
* Quote database name.

Fixes plotly#299
Fixes plotly#409
@n-riesco
Copy link
Contributor Author

@pabucur Oh, I see. The table name also needs quoting. I'll fix that on #464 .

@n-riesco
Copy link
Contributor Author

@pabucur If you want to test #464, the installer for windows is here.

n-riesco added a commit that referenced this issue Jun 25, 2018
mssql: fix issues #299 #409 #462
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant