Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process failed when importing a Siard file into a Sql Server database of the schema name contains "_" #106

Open
bt-cgi opened this issue Aug 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bt-cgi
Copy link

bt-cgi commented Aug 29, 2024

Hello,

When importing a Siard file into a SQL Server database into a schema whose the name contains the character "_", the process checks if the schema already exists with the following query:

select sys.schemas.name 'TABLE_SCHEM', CASE WHEN sys.schemas.name IN ('dbo', 'guest','INFORMATION_SCHEMA','sys','db_owner', 'db_accessadmin', 'db_securityadmin',
'db_ddladmin' ,'db_backupoperator','db_datareader','db_datawriter','db_denydatareader','db_denydatawriter') THEN null ELSE DB_NAME() END 'TABLE_CATALOG'
from sys.schemas where sys.schemas.name like N'DBA_JBP' order by 2, 1

The query doesn't work because the escape character "\" (antislash) behind the "_" is ignored in SQL Server (it may be specific to Oracle databases).

If the schema already exists, the query don't find it and the process try to create it, that makes it fail.

@mburri mburri added the bug Something isn't working label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants