Skip to content

Modal top-level parameter 'close' is a reserved keyword in SQL Server #1070

@charlieglnp

Description

@charlieglnp

Introduction

The top-level parameter 'close' of the model component is a reserved word in Transect-SQL and results in an error when used on SQL Server.

To Reproduce

select  'modal' as component,
		'test' || 'modal' as id,
		'Close' as close;

The concatenation is to force the query through SQL server (no error occurs otherwise)

Actual behavior

In "test.sql": The following error occurred while executing an SQL statement:
error returned from database: Incorrect syntax near the keyword 'close'.

Expected behavior

Modal component to not return an error when 'close' top-level parameter is used

Version information

  • OS: Windows 11
  • Database SQL Server 2019
  • SQLPage Version 0.38.0

Additional context

A workaround is to enclose the top-level parameter in square brackets

select  'modal' as component,
		'test' || 'modal' as id,
		'Close' as [close];

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions