SQL Statements and Square Brackets
Answered

Is the Above statement, why is the square bracket marked as in error?
The Dialect is set to SQL Server.
Please sign in to leave a comment.
do you have File | Settings | Languages & Frameworks | SQL Resolution Scopes configured for your project? Also please check settings here File | Settings | Editor | Code Style | SQL | MS SQL Server -> Case -> Quotation character -> Set to 'Brackets'.
and could you please share this piece of code as a text?
Hi!
Thank you for the reply!
Setting Quotation character -> Set to 'Brackets' solved my issue, thank you.
I do not have SQL Resolution Scopes, not sure how to do this.
Text from File | Settings | Editor | Code Style | SQL | MS SQL Server -> Case:
CREATE TABLE Detail
(
Id bigint not null,
Name varchar(60) not null,
Note varchar(2000),
Catalog_Nr smallint,
constraint [Detail pk]
primary key (Id),
constraint [Detail to Catalog ref]
foreign key (Catalog_Nr)
references Main_Catalog
)
go
SELECT cast(I.object_id as bigint) * 100000 + (I.index_id % 30000) as Combi_Id,
T.type as The_Type
FROM [master].sys.all_objects as T,
[master].sys.indexes as I
WHERE T.schema_id = @theSchemaId
and T.type in ('U', 'S', 'IT', 'V', 'TT')
and T.object_id = I.object_id
and I.type != 0
go
if you have a data source with your database configured then just add it to [SQL Resolution scopes]